|
|
|
|
@@ -15,6 +15,20 @@ struct square
|
|
|
|
|
FIT_PLACEHOLDER_TEST_CONSTEXPR auto operator()(T x) const FIT_RETURNS(x*x);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define CHECK_DEFAULT_CONSTRUCTION_OP(op, name) \
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<fit::operators::name>::value, "Operator not default constructible");
|
|
|
|
|
|
|
|
|
|
FIT_TEST_CASE()
|
|
|
|
|
{
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<fit::placeholder<1>>::value, "Placeholder not default constructible");
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<fit::placeholder<2>>::value, "Placeholder not default constructible");
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<fit::placeholder<3>>::value, "Placeholder not default constructible");
|
|
|
|
|
|
|
|
|
|
FIT_FOREACH_BINARY_OP(CHECK_DEFAULT_CONSTRUCTION_OP)
|
|
|
|
|
FIT_FOREACH_ASSIGN_OP(CHECK_DEFAULT_CONSTRUCTION_OP)
|
|
|
|
|
FIT_FOREACH_UNARY_OP(CHECK_DEFAULT_CONSTRUCTION_OP)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FIT_TEST_CASE()
|
|
|
|
|
{
|
|
|
|
|
const auto x_square_add = 2 + (4*4);
|
|
|
|
|
@@ -43,6 +57,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_add)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_add)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_add(2, 1) == x_add);
|
|
|
|
|
FIT_TEST_CHECK(f_add(2, 1) == x_add);
|
|
|
|
|
|
|
|
|
|
@@ -51,6 +66,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_subtract)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_subtract(2, 1) == x_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_subtract(2, 1) == x_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -59,6 +75,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_multiply)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_multiply)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_multiply(2, 1) == x_multiply);
|
|
|
|
|
FIT_TEST_CHECK(f_multiply(2, 1) == x_multiply);
|
|
|
|
|
|
|
|
|
|
@@ -67,6 +84,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_divide)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_divide)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_divide(2, 1) == x_divide);
|
|
|
|
|
FIT_TEST_CHECK(f_divide(2, 1) == x_divide);
|
|
|
|
|
|
|
|
|
|
@@ -75,6 +93,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_remainder)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_remainder)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_remainder(2, 1) == x_remainder);
|
|
|
|
|
FIT_TEST_CHECK(f_remainder(2, 1) == x_remainder);
|
|
|
|
|
|
|
|
|
|
@@ -83,6 +102,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_right)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_shift_right)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_right(2, 1) == x_shift_right);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_right(2, 1) == x_shift_right);
|
|
|
|
|
|
|
|
|
|
@@ -91,6 +111,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_left)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_shift_left)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_left(2, 1) == x_shift_left);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_left(2, 1) == x_shift_left);
|
|
|
|
|
|
|
|
|
|
@@ -99,6 +120,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_greater_than)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than(2, 1) == x_greater_than);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than(2, 1) == x_greater_than);
|
|
|
|
|
|
|
|
|
|
@@ -107,6 +129,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_less_than)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than(2, 1) == x_less_than);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than(2, 1) == x_less_than);
|
|
|
|
|
|
|
|
|
|
@@ -115,6 +138,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_less_than_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than_equal(2, 1) == x_less_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than_equal(2, 1) == x_less_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -123,6 +147,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_greater_than_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than_equal(2, 1) == x_greater_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than_equal(2, 1) == x_greater_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -131,6 +156,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_equal(2, 1) == x_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_equal(2, 1) == x_equal);
|
|
|
|
|
|
|
|
|
|
@@ -139,6 +165,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_not_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_equal(2, 1) == x_not_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_not_equal(2, 1) == x_not_equal);
|
|
|
|
|
|
|
|
|
|
@@ -147,6 +174,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_and)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_bit_and)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_and(2, 1) == x_bit_and);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_and(2, 1) == x_bit_and);
|
|
|
|
|
|
|
|
|
|
@@ -155,6 +183,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_xor_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_xor_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_xor_(2, 1) == x_xor_);
|
|
|
|
|
FIT_TEST_CHECK(f_xor_(2, 1) == x_xor_);
|
|
|
|
|
|
|
|
|
|
@@ -163,6 +192,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_or)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_bit_or)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_or(2, 1) == x_bit_or);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_or(2, 1) == x_bit_or);
|
|
|
|
|
|
|
|
|
|
@@ -171,6 +201,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_and_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_and_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_and_(true, false) == x_and_);
|
|
|
|
|
FIT_TEST_CHECK(f_and_(true, false) == x_and_);
|
|
|
|
|
|
|
|
|
|
@@ -179,6 +210,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_or_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_or_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_or_(true, false) == x_or_);
|
|
|
|
|
FIT_TEST_CHECK(f_or_(true, false) == x_or_);
|
|
|
|
|
}
|
|
|
|
|
@@ -191,6 +223,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_not_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_(false) == x_not_);
|
|
|
|
|
FIT_TEST_CHECK(f_not_(false) == x_not_);
|
|
|
|
|
|
|
|
|
|
@@ -199,6 +232,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_compl_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_compl_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_compl_(2) == x_compl_);
|
|
|
|
|
FIT_TEST_CHECK(f_compl_(2) == x_compl_);
|
|
|
|
|
|
|
|
|
|
@@ -207,6 +241,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_unary_plus)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_unary_plus)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_unary_plus(2) == x_unary_plus);
|
|
|
|
|
FIT_TEST_CHECK(f_unary_plus(2) == x_unary_plus);
|
|
|
|
|
|
|
|
|
|
@@ -215,6 +250,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_unary_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_unary_subtract)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_unary_subtract(2) == x_unary_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_unary_subtract(2) == x_unary_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -223,6 +259,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_dereference)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_dereference)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_dereference(&x_dereference) == x_dereference);
|
|
|
|
|
FIT_TEST_CHECK(f_dereference(&x_dereference) == x_dereference);
|
|
|
|
|
|
|
|
|
|
@@ -233,6 +270,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_increment)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_increment)>::value, "Not default constructible");
|
|
|
|
|
f_increment(x_increment);
|
|
|
|
|
FIT_TEST_CHECK(x_increment == 3);
|
|
|
|
|
|
|
|
|
|
@@ -241,6 +279,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_decrement)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_decrement)>::value, "Not default constructible");
|
|
|
|
|
f_decrement(x_decrement);
|
|
|
|
|
FIT_TEST_CHECK(x_decrement == 1);
|
|
|
|
|
#endif
|
|
|
|
|
@@ -256,6 +295,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_add)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_add)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_add(2, 1) == x_add);
|
|
|
|
|
FIT_TEST_CHECK(f_add(2, 1) == x_add);
|
|
|
|
|
|
|
|
|
|
@@ -264,6 +304,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_subtract)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_subtract(2, 1) == x_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_subtract(2, 1) == x_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -272,6 +313,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_multiply)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_multiply)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_multiply(2, 1) == x_multiply);
|
|
|
|
|
FIT_TEST_CHECK(f_multiply(2, 1) == x_multiply);
|
|
|
|
|
|
|
|
|
|
@@ -280,6 +322,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_divide)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_divide)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_divide(2, 1) == x_divide);
|
|
|
|
|
FIT_TEST_CHECK(f_divide(2, 1) == x_divide);
|
|
|
|
|
|
|
|
|
|
@@ -288,6 +331,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_remainder)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_remainder)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_remainder(2, 1) == x_remainder);
|
|
|
|
|
FIT_TEST_CHECK(f_remainder(2, 1) == x_remainder);
|
|
|
|
|
|
|
|
|
|
@@ -296,6 +340,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_right)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_shift_right)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_right(2, 1) == x_shift_right);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_right(2, 1) == x_shift_right);
|
|
|
|
|
|
|
|
|
|
@@ -304,6 +349,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_left)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_shift_left)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_left(2, 1) == x_shift_left);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_left(2, 1) == x_shift_left);
|
|
|
|
|
|
|
|
|
|
@@ -312,6 +358,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_greater_than)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than(2, 1) == x_greater_than);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than(2, 1) == x_greater_than);
|
|
|
|
|
|
|
|
|
|
@@ -320,6 +367,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_less_than)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than(2, 1) == x_less_than);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than(2, 1) == x_less_than);
|
|
|
|
|
|
|
|
|
|
@@ -328,6 +376,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_less_than_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than_equal(2, 1) == x_less_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than_equal(2, 1) == x_less_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -336,6 +385,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_greater_than_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than_equal(2, 1) == x_greater_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than_equal(2, 1) == x_greater_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -344,6 +394,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_equal(2, 1) == x_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_equal(2, 1) == x_equal);
|
|
|
|
|
|
|
|
|
|
@@ -352,6 +403,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_not_equal)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_equal(2, 1) == x_not_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_not_equal(2, 1) == x_not_equal);
|
|
|
|
|
|
|
|
|
|
@@ -360,6 +412,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_and)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_bit_and)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_and(2, 1) == x_bit_and);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_and(2, 1) == x_bit_and);
|
|
|
|
|
|
|
|
|
|
@@ -368,6 +421,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_xor_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_xor_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_xor_(2, 1) == x_xor_);
|
|
|
|
|
FIT_TEST_CHECK(f_xor_(2, 1) == x_xor_);
|
|
|
|
|
|
|
|
|
|
@@ -376,6 +430,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_or)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_bit_or)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_or(2, 1) == x_bit_or);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_or(2, 1) == x_bit_or);
|
|
|
|
|
|
|
|
|
|
@@ -384,6 +439,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_and_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_and_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_and_(true, false) == x_and_);
|
|
|
|
|
FIT_TEST_CHECK(f_and_(true, false) == x_and_);
|
|
|
|
|
|
|
|
|
|
@@ -392,6 +448,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_or_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_or_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_or_(true, false) == x_or_);
|
|
|
|
|
FIT_TEST_CHECK(f_or_(true, false) == x_or_);
|
|
|
|
|
}
|
|
|
|
|
@@ -403,6 +460,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_add)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_add)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_add(1) == x_add);
|
|
|
|
|
FIT_TEST_CHECK(f_add(1) == x_add);
|
|
|
|
|
|
|
|
|
|
@@ -411,6 +469,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_subtract)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_subtract(1) == x_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_subtract(1) == x_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -419,6 +478,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_multiply)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_multiply)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_multiply(1) == x_multiply);
|
|
|
|
|
FIT_TEST_CHECK(f_multiply(1) == x_multiply);
|
|
|
|
|
|
|
|
|
|
@@ -427,6 +487,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_divide)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_divide)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_divide(1) == x_divide);
|
|
|
|
|
FIT_TEST_CHECK(f_divide(1) == x_divide);
|
|
|
|
|
|
|
|
|
|
@@ -435,6 +496,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_remainder)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_remainder)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_remainder(1) == x_remainder);
|
|
|
|
|
FIT_TEST_CHECK(f_remainder(1) == x_remainder);
|
|
|
|
|
|
|
|
|
|
@@ -443,6 +505,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_right)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_shift_right)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_right(1) == x_shift_right);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_right(1) == x_shift_right);
|
|
|
|
|
|
|
|
|
|
@@ -451,6 +514,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_left)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_shift_left)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_left(1) == x_shift_left);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_left(1) == x_shift_left);
|
|
|
|
|
|
|
|
|
|
@@ -459,6 +523,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_greater_than)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than(1) == x_greater_than);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than(1) == x_greater_than);
|
|
|
|
|
|
|
|
|
|
@@ -467,6 +532,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_less_than)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than(1) == x_less_than);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than(1) == x_less_than);
|
|
|
|
|
|
|
|
|
|
@@ -475,6 +541,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_less_than_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than_equal(1) == x_less_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than_equal(1) == x_less_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -483,6 +550,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_greater_than_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than_equal(1) == x_greater_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than_equal(1) == x_greater_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -491,6 +559,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_equal(1) == x_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_equal(1) == x_equal);
|
|
|
|
|
|
|
|
|
|
@@ -499,6 +568,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_not_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_equal(1) == x_not_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_not_equal(1) == x_not_equal);
|
|
|
|
|
|
|
|
|
|
@@ -507,6 +577,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_and)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_bit_and)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_and(1) == x_bit_and);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_and(1) == x_bit_and);
|
|
|
|
|
|
|
|
|
|
@@ -515,6 +586,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_xor_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_xor_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_xor_(1) == x_xor_);
|
|
|
|
|
FIT_TEST_CHECK(f_xor_(1) == x_xor_);
|
|
|
|
|
|
|
|
|
|
@@ -523,6 +595,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_or)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_bit_or)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_or(1) == x_bit_or);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_or(1) == x_bit_or);
|
|
|
|
|
|
|
|
|
|
@@ -531,6 +604,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_and_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_and_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_and_(false) == x_and_);
|
|
|
|
|
FIT_TEST_CHECK(f_and_(false) == x_and_);
|
|
|
|
|
|
|
|
|
|
@@ -539,6 +613,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_or_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_or_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_or_(false) == x_or_);
|
|
|
|
|
FIT_TEST_CHECK(f_or_(false) == x_or_);
|
|
|
|
|
}
|
|
|
|
|
@@ -550,6 +625,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_add)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_add)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_add(2) == x_add);
|
|
|
|
|
FIT_TEST_CHECK(f_add(2) == x_add);
|
|
|
|
|
|
|
|
|
|
@@ -558,6 +634,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_subtract)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_subtract(2) == x_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_subtract(2) == x_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -566,6 +643,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_multiply)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_multiply)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_multiply(2) == x_multiply);
|
|
|
|
|
FIT_TEST_CHECK(f_multiply(2) == x_multiply);
|
|
|
|
|
|
|
|
|
|
@@ -574,6 +652,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_divide)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_divide)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_divide(2) == x_divide);
|
|
|
|
|
FIT_TEST_CHECK(f_divide(2) == x_divide);
|
|
|
|
|
|
|
|
|
|
@@ -582,6 +661,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_remainder)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_remainder)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_remainder(2) == x_remainder);
|
|
|
|
|
FIT_TEST_CHECK(f_remainder(2) == x_remainder);
|
|
|
|
|
|
|
|
|
|
@@ -590,6 +670,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_right)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_shift_right)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_right(2) == x_shift_right);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_right(2) == x_shift_right);
|
|
|
|
|
|
|
|
|
|
@@ -598,6 +679,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_shift_left)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_shift_left)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_shift_left(2) == x_shift_left);
|
|
|
|
|
FIT_TEST_CHECK(f_shift_left(2) == x_shift_left);
|
|
|
|
|
|
|
|
|
|
@@ -606,6 +688,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_greater_than)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than(2) == x_greater_than);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than(2) == x_greater_than);
|
|
|
|
|
|
|
|
|
|
@@ -614,6 +697,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_less_than)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than(2) == x_less_than);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than(2) == x_less_than);
|
|
|
|
|
|
|
|
|
|
@@ -622,6 +706,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_less_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_less_than_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_less_than_equal(2) == x_less_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_less_than_equal(2) == x_less_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -630,6 +715,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_greater_than_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_greater_than_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_greater_than_equal(2) == x_greater_than_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_greater_than_equal(2) == x_greater_than_equal);
|
|
|
|
|
|
|
|
|
|
@@ -638,6 +724,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_equal(2) == x_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_equal(2) == x_equal);
|
|
|
|
|
|
|
|
|
|
@@ -646,6 +733,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_equal)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_not_equal)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_equal(2) == x_not_equal);
|
|
|
|
|
FIT_TEST_CHECK(f_not_equal(2) == x_not_equal);
|
|
|
|
|
|
|
|
|
|
@@ -654,6 +742,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_and)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_bit_and)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_and(2) == x_bit_and);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_and(2) == x_bit_and);
|
|
|
|
|
|
|
|
|
|
@@ -662,6 +751,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_xor_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_xor_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_xor_(2) == x_xor_);
|
|
|
|
|
FIT_TEST_CHECK(f_xor_(2) == x_xor_);
|
|
|
|
|
|
|
|
|
|
@@ -670,6 +760,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_bit_or)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_bit_or)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_bit_or(2) == x_bit_or);
|
|
|
|
|
FIT_TEST_CHECK(f_bit_or(2) == x_bit_or);
|
|
|
|
|
|
|
|
|
|
@@ -678,6 +769,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_and_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_and_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_and_(true) == x_and_);
|
|
|
|
|
FIT_TEST_CHECK(f_and_(true) == x_and_);
|
|
|
|
|
|
|
|
|
|
@@ -686,6 +778,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_or_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(!fit::detail::is_default_constructible<decltype(f_or_)>::value, "default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_or_(true) == x_or_);
|
|
|
|
|
FIT_TEST_CHECK(f_or_(true) == x_or_);
|
|
|
|
|
}
|
|
|
|
|
@@ -698,6 +791,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_not_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_not_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_not_(false) == x_not_);
|
|
|
|
|
FIT_TEST_CHECK(f_not_(false) == x_not_);
|
|
|
|
|
|
|
|
|
|
@@ -706,6 +800,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_compl_)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_compl_)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_compl_(2) == x_compl_);
|
|
|
|
|
FIT_TEST_CHECK(f_compl_(2) == x_compl_);
|
|
|
|
|
|
|
|
|
|
@@ -714,6 +809,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_unary_plus)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_unary_plus)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_unary_plus(2) == x_unary_plus);
|
|
|
|
|
FIT_TEST_CHECK(f_unary_plus(2) == x_unary_plus);
|
|
|
|
|
|
|
|
|
|
@@ -722,6 +818,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_unary_subtract)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_unary_subtract)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_unary_subtract(2) == x_unary_subtract);
|
|
|
|
|
FIT_TEST_CHECK(f_unary_subtract(2) == x_unary_subtract);
|
|
|
|
|
|
|
|
|
|
@@ -730,6 +827,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_dereference)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_dereference)>::value, "Not default constructible");
|
|
|
|
|
FIT_STATIC_TEST_CHECK(f_dereference(&x_dereference) == x_dereference);
|
|
|
|
|
FIT_TEST_CHECK(f_dereference(&x_dereference) == x_dereference);
|
|
|
|
|
|
|
|
|
|
@@ -740,6 +838,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_increment)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_increment)>::value, "Not default constructible");
|
|
|
|
|
f_increment(x_increment);
|
|
|
|
|
FIT_TEST_CHECK(x_increment == 3);
|
|
|
|
|
|
|
|
|
|
@@ -748,6 +847,7 @@ FIT_TEST_CASE()
|
|
|
|
|
#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
|
|
|
|
static_assert(std::is_copy_constructible<decltype(f_decrement)>::value, "Not copyable");
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(fit::detail::is_default_constructible<decltype(f_decrement)>::value, "Not default constructible");
|
|
|
|
|
f_decrement(x_decrement);
|
|
|
|
|
FIT_TEST_CHECK(x_decrement == 1);
|
|
|
|
|
#endif
|
|
|
|
|
|