static_assert

This commit is contained in:
2020-08-19 16:48:08 +03:00
parent ccd6a9888f
commit 05607ccf0e
6 changed files with 13 additions and 4 deletions

View File

@@ -28,6 +28,7 @@
template<typename Type>
class PIP_EXPORT PIPoint {
static_assert(std::is_arithmetic<Type>::value, "Type must be arithmetic");
public:
Type x;
Type y;
@@ -75,6 +76,7 @@ typedef PIPoint<double> PIPointd;
template<typename Type>
class PIP_EXPORT PIRect {
static_assert(std::is_arithmetic<Type>::value, "Type must be arithmetic");
public:
Type x0;
Type y0;