diff --git a/fit/alias.h b/fit/alias.h index 3299525..d7b8d90 100644 --- a/fit/alias.h +++ b/fit/alias.h @@ -50,6 +50,10 @@ /// constexpr auto alias_value(Alias&&); /// +#ifdef _MSC_VER +#pragma warning(disable: 4579) +#endif + namespace fit { template @@ -134,6 +138,15 @@ namespace detail { template struct alias_static_storage { +#ifdef _MSC_VER + // Since we disable the error for 4579 on MSVC, which leaves the static + // member unitialized at runtime, it is, therefore, only safe to use this + // class on types that are empty with constructors that have no possible + // side effects. + static_assert(std::is_empty::value && + std::is_literal_type::value && + std::is_default_constructible::value, "In-class initialization is not yet implemented on MSVC"); +#endif static constexpr T value = T(); }; diff --git a/fit/by.h b/fit/by.h index 5846310..9d45ed4 100644 --- a/fit/by.h +++ b/fit/by.h @@ -170,6 +170,8 @@ struct by_adaptor : Projection, F return always_ref(*this)(xs...); } + FIT_INHERIT_DEFAULT(by_adaptor, Projection, F) + template constexpr by_adaptor(P&& p, G&& f) : Projection(fit::forward

(p)), F(fit::forward(f)) @@ -199,6 +201,8 @@ struct by_adaptor : Projection return always_ref(*this)(xs...); } + FIT_INHERIT_DEFAULT(by_adaptor, Projection) + template constexpr by_adaptor(P&& p) : Projection(fit::forward

(p)) diff --git a/fit/detail/compressed_pair.h b/fit/detail/compressed_pair.h index 10bda63..1cff7c2 100644 --- a/fit/detail/compressed_pair.h +++ b/fit/detail/compressed_pair.h @@ -88,6 +88,8 @@ struct compressed_pair : FirstBase(fit::forward(x)), SecondBase(fit::forward(y)) {} + FIT_INHERIT_DEFAULT(compressed_pair, FirstBase, SecondBase) + template constexpr const Base& get_base(Xs&&... xs) const { diff --git a/fit/detail/delegate.h b/fit/detail/delegate.h index d2fdcce..8de6ea0 100644 --- a/fit/detail/delegate.h +++ b/fit/detail/delegate.h @@ -22,6 +22,14 @@ #endif #endif +#ifndef FIT_NO_STD_DEFAULT_CONSTRUCTIBLE +#if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7 +#define FIT_NO_STD_DEFAULT_CONSTRUCTIBLE 1 +#else +#define FIT_NO_STD_DEFAULT_CONSTRUCTIBLE 0 +#endif +#endif + #define FIT_ENABLE_IF_CONVERTIBLE(...) \ class=typename std::enable_if::value>::type @@ -31,15 +39,17 @@ #define FIT_ENABLE_IF_CONSTRUCTIBLE(...) \ class=typename std::enable_if::value>::type -#ifndef _MSC_VER #define FIT_INHERIT_DEFAULT(C, ...) \ template::value>::type> \ constexpr C() {} -#else -#define FIT_INHERIT_DEFAULT(C, ...) \ - constexpr C() = default; -#endif + +#define FIT_INHERIT_DEFAULT_EMPTY(C, ...) \ + template::value && std::is_empty<__VA_ARGS__>::value \ + >::type> \ + constexpr C() {} #if FIT_NO_TYPE_PACK_EXPANSION_IN_TEMPLATE @@ -84,7 +94,11 @@ struct is_default_constructible_helper template struct is_default_constructible +#if FIT_NO_STD_DEFAULT_CONSTRUCTIBLE : and_...> +#else +: and_...> +#endif {}; template diff --git a/fit/function.h b/fit/function.h index e01ac17..39ab5a0 100644 --- a/fit/function.h +++ b/fit/function.h @@ -44,12 +44,14 @@ struct reveal_static_const_factory template constexpr reveal_adaptor operator=(const F& f) const { + static_assert(is_default_constructible::value, "Static functions must be default constructible"); return reveal_adaptor(f); } #else template constexpr const reveal_adaptor& operator=(const F&) const { + static_assert(is_default_constructible::value, "Static functions must be default constructible"); return static_const_var>(); } #endif diff --git a/fit/lazy.h b/fit/lazy.h index 409de86..234ed44 100644 --- a/fit/lazy.h +++ b/fit/lazy.h @@ -151,7 +151,18 @@ struct lazy_invoker typedef detail::compressed_pair base_type; typedef lazy_invoker fit_rewritable1_tag; +#ifdef _MSC_VER FIT_INHERIT_CONSTRUCTOR(lazy_invoker, base_type) +#else + FIT_INHERIT_DEFAULT_EMPTY(lazy_invoker, base_type) + + template + constexpr lazy_invoker(X&& x, Y&& y) + : base_type(fit::forward(x), fit::forward(y)) + {} +#endif template constexpr const F& base_function(Ts&&... xs) const diff --git a/fit/pack.h b/fit/pack.h index 19fc17d..9609317 100644 --- a/fit/pack.h +++ b/fit/pack.h @@ -96,7 +96,7 @@ struct pack_holder : std::conditional< std::is_empty::value && std::is_literal_type::value && - is_default_constructible::value, + is_default_constructible::value, alias_static, alias > diff --git a/fit/placeholders.h b/fit/placeholders.h index 6e220ca..0afb95b 100644 --- a/fit/placeholders.h +++ b/fit/placeholders.h @@ -167,7 +167,6 @@ FIT_FOREACH_UNARY_OP(FIT_UNARY_OP) template struct placeholder { - #if FIT_HAS_MANGLE_OVERLOAD template constexpr auto operator()(Ts&&... xs) const FIT_RETURNS @@ -252,7 +251,11 @@ struct partial_ap { T val; - FIT_DELGATE_CONSTRUCTOR(partial_ap, T, val); + FIT_INHERIT_DEFAULT_EMPTY(partial_ap, T) + + template + constexpr partial_ap(X&& x, Xs&&... xs) : val(fit::forward(x), fit::forward(xs)...) + {} FIT_RETURNS_CLASS(partial_ap); diff --git a/test/by.cpp b/test/by.cpp index 9351d4b..1436e20 100644 --- a/test/by.cpp +++ b/test/by.cpp @@ -28,12 +28,14 @@ FIT_TEST_CASE() // Using mutable_ as a workaround on libc++, since mem_fn does not meet the // requirements of a FunctionObject FIT_TEST_CHECK(fit::by(fit::mutable_(std::mem_fn(&foo::x)), add)(foo(1), foo(2)) == 3); + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); } FIT_TEST_CASE() { auto indirect_add = fit::by(*fit::_, fit::_ + fit::_); FIT_TEST_CHECK(indirect_add(std::unique_ptr(new int(1)), std::unique_ptr(new int(2))) == 3); + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); } struct select_x_1 diff --git a/test/pack.cpp b/test/pack.cpp index cd4d361..6358372 100644 --- a/test/pack.cpp +++ b/test/pack.cpp @@ -128,45 +128,80 @@ FIT_TEST_CASE() // FIT_TEST_CHECK(p(deref()) == 3); } -class empty1 +struct empty1 {}; -class empty2 +struct empty2 {}; + FIT_TEST_CASE() { - static constexpr auto p1 = fit::pack(empty1()); - FIT_TEST_CHECK(p1(fit::always(0)) == 0); - FIT_STATIC_TEST_CHECK(p1(fit::always(0)) == 0); -#ifndef _MSC_VER - static_assert(std::is_empty::value, "Pack not empty"); -#endif - - static constexpr auto p2 = fit::pack(empty1(), empty2()); - FIT_TEST_CHECK(p2(fit::always(0)) == 0); - FIT_STATIC_TEST_CHECK(p2(fit::always(0)) == 0); -#ifndef _MSC_VER - static_assert(std::is_empty::value, "Pack not empty"); -#endif - - static constexpr auto p3 = fit::pack(empty1(), empty2(), empty1()); - FIT_TEST_CHECK(p3(fit::always(0)) == 0); - FIT_STATIC_TEST_CHECK(p3(fit::always(0)) == 0); -#ifndef _MSC_VER - static_assert(std::is_empty::value, "Pack not empty"); -#endif - - static constexpr auto p4 = fit::pack(empty1(), fit::pack(empty1(), empty2())); - FIT_TEST_CHECK(p4(fit::always(0)) == 0); - FIT_STATIC_TEST_CHECK(p4(fit::always(0)) == 0); -#ifndef _MSC_VER - static_assert(std::is_empty::value, "Pack not empty"); -#endif - - static constexpr auto p5 = fit::pack(fit::pack(), fit::pack(fit::pack()), empty1(), fit::pack(empty1(), empty2())); - FIT_TEST_CHECK(p5(fit::always(0)) == 0); - FIT_STATIC_TEST_CHECK(p5(fit::always(0)) == 0); -#ifndef _MSC_VER - static_assert(std::is_empty::value, "Pack not empty"); -#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(empty1()); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); + +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(empty1(), empty2()); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(fit::pack(), fit::pack()); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(empty1(), empty2(), empty1()); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(empty1(), fit::pack(empty1(), empty2())); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); +} + +FIT_TEST_CASE() +{ + static constexpr auto p = fit::pack(fit::pack(), fit::pack(fit::pack()), empty1(), fit::pack(empty1(), empty2())); + FIT_TEST_CHECK(p(fit::always(0)) == 0); + FIT_STATIC_TEST_CHECK(p(fit::always(0)) == 0); +#ifndef _MSC_VER + static_assert(std::is_empty::value, "Pack not empty"); +#endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); } diff --git a/test/placeholders.cpp b/test/placeholders.cpp index fa3436b..451dcb4 100644 --- a/test/placeholders.cpp +++ b/test/placeholders.cpp @@ -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::value, "Operator not default constructible"); + +FIT_TEST_CASE() +{ + static_assert(fit::detail::is_default_constructible>::value, "Placeholder not default constructible"); + static_assert(fit::detail::is_default_constructible>::value, "Placeholder not default constructible"); + static_assert(fit::detail::is_default_constructible>::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(!fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::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::value, "Not copyable"); #endif + static_assert(fit::detail::is_default_constructible::value, "Not default constructible"); f_decrement(x_decrement); FIT_TEST_CHECK(x_decrement == 1); #endif