joboccara / NamedType

Implementation of strong types in C++
MIT License
772 stars 85 forks source link

Failure to perform standard compile time checks #75

Open AneekCN opened 2 years ago

AneekCN commented 2 years ago

Arithmetic NamedType does not pass std::is_arithmetic assertion. i.e.

using MyInt = fluent::NamedType<int, struct _MyInt, fluent::Arithmetic>;
static_assert(std::is_arithmetic<MyInt>() == true); // does not compile

This could be potentially fixed using the same pattern as fluent::Hashable, but need to consider other types of assertions for completeness sake