aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2020-01-02 16:04:45 +0100
committerFelix Morgner <felix.morgner@gmail.com>2020-01-03 11:03:24 +0100
commit8551177740f435bd510df6af3fa3d32da39bb526 (patch)
tree5520fc5551ef018c8f3853da3750c2378a570f52
parent2ed17f76082c23c995b59e3b0c1282e7872adf7f (diff)
downloadnewtype-8551177740f435bd510df6af3fa3d32da39bb526.tar.xz
newtype-8551177740f435bd510df6af3fa3d32da39bb526.zip
derivable: simplify implementation
-rw-r--r--include/newtype/derivable.hpp9
-rw-r--r--include/newtype/new_type.hpp1
-rw-r--r--include/newtype/type.hpp29
3 files changed, 5 insertions, 34 deletions
diff --git a/include/newtype/derivable.hpp b/include/newtype/derivable.hpp
index d5672ac..95353eb 100644
--- a/include/newtype/derivable.hpp
+++ b/include/newtype/derivable.hpp
@@ -1,13 +1,14 @@
#ifndef NEWTYPE_DERIVABLE_HPP
#define NEWTYPE_DERIVABLE_HPP
-#include "newtype/type.hpp"
-
namespace nt
{
- template<typename NameTag>
- using derivable = type<NameTag>;
+ template<typename DerivableTag>
+ struct derivable final
+ {
+ using tag_type = DerivableTag;
+ };
/**
* @brief A set of standard derivation tags
diff --git a/include/newtype/new_type.hpp b/include/newtype/new_type.hpp
index b599c45..a59a074 100644
--- a/include/newtype/new_type.hpp
+++ b/include/newtype/new_type.hpp
@@ -5,7 +5,6 @@
#include "newtype/deriving.hpp"
#include "newtype/impl/new_type_storage.hpp"
#include "newtype/impl/type_traits_extensions.hpp"
-#include "newtype/type.hpp"
#include <istream>
#include <ostream>
diff --git a/include/newtype/type.hpp b/include/newtype/type.hpp
deleted file mode 100644
index b1f8787..0000000
--- a/include/newtype/type.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef NEWTYPE_TYPE_HPP
-#define NEWTYPE_TYPE_HPP
-
-namespace nt
-{
-
- /**
- * A convenience type to make values out of types
- *
- * @tparam Type The type to wrap
- * @since 1.0.0
- */
- template<typename Type>
- struct type final
- {
- };
-
- /**
- * A value to represent a type
- *
- * @tparam The type to represent
- * @since 1.0.0
- */
- template<typename Type>
- auto constexpr type_v = type<Type>{};
-
-} // namespace nt
-
-#endif \ No newline at end of file