diff options
Diffstat (limited to 'modules/codec-unit/c++/unit_schema.hpp')
| -rw-r--r-- | modules/codec-unit/c++/unit_schema.hpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/codec-unit/c++/unit_schema.hpp b/modules/codec-unit/c++/unit_schema.hpp index 5de8770..a675e23 100644 --- a/modules/codec-unit/c++/unit_schema.hpp +++ b/modules/codec-unit/c++/unit_schema.hpp @@ -4,11 +4,17 @@ namespace saw { namespace schema { -template<typename Unit, int64_t Exponent> -struct UnitElement {}; +template<typename Un, int64_t Expo = 0, int64_t Scal = 0> +struct UnitElement { + using Schema = Un; + static constexpr int64_t Exponent = Expo; + static constexpr int64_t Scaling = Scal; +}; template<typename BaseSchema, typename ... Components> -struct Unit {}; +struct Unit { + using Schema = BaseSchema; +}; template<typename BaseSchema> using Pure = Unit<BaseSchema>; |
