|
|
@@ -14,6 +14,7 @@
|
|
|
|
|
|
#include "arithmetic.hpp"
|
|
|
#include "comparable.hpp"
|
|
|
+#include "traits.hpp"
|
|
|
|
|
|
namespace types {
|
|
|
/**
|
|
|
@@ -61,6 +62,10 @@ namespace types {
|
|
|
template <typename Base, typename Tag, template <typename> class... Skills>
|
|
|
class opaque_typedef
|
|
|
: public Skills<opaque_typedef<Base, Tag, Skills...>>... {
|
|
|
+ public:
|
|
|
+ using value_type = Base;
|
|
|
+ using underlying_type = underlying_type_t<Base>;
|
|
|
+
|
|
|
private:
|
|
|
Base value_;
|
|
|
|
|
|
@@ -103,7 +108,8 @@ namespace types {
|
|
|
* Explicit conversion for use in static_casts, or by invoking get()
|
|
|
* directly in your code.
|
|
|
*/
|
|
|
- Base const & get() const { return value_; }
|
|
|
- explicit operator Base const &() const { return value_; }
|
|
|
+ value_type const & get() const { return value_; }
|
|
|
+ explicit operator value_type const &() const { return value_; }
|
|
|
+ underlying_type operator*() const { return value_; }
|
|
|
};
|
|
|
}
|