diff --git a/test/entt/core/type_traits.cpp b/test/entt/core/type_traits.cpp index 2825e3d77..abb51cc31 100644 --- a/test/entt/core/type_traits.cpp +++ b/test/entt/core/type_traits.cpp @@ -41,16 +41,20 @@ struct multi_argument_operation { struct UnpackAsType: ::testing::Test { template - static inline auto func = [](entt::unpack_as_type... value) { - return (value + ... + Type{}); - }; + static auto test_for() { + return [](entt::unpack_as_type... value) { + return (value + ... + Type{}); + }; + } }; struct UnpackAsValue: ::testing::Test { template - static inline auto func = [](auto &&...args) { - return (entt::unpack_as_value + ... + 0); - }; + static auto test_for() { + return [](auto &&...args) { + return (entt::unpack_as_value + ... + 0); + }; + } }; TEST(SizeOf, Functionalities) { @@ -61,13 +65,13 @@ TEST(SizeOf, Functionalities) { } TEST_F(UnpackAsType, Functionalities) { - ASSERT_EQ((this->func(1, 2, 3)), 6); - ASSERT_EQ((this->func(2.f, 2.2)), 4.2f); + ASSERT_EQ((this->test_for()(1, 2, 3)), 6); + ASSERT_EQ((this->test_for()(2.f, 2.2)), 4.2f); } TEST_F(UnpackAsValue, Functionalities) { - ASSERT_EQ((this->func<2>('c', 42., true)), 6); - ASSERT_EQ((this->func('c', 42.)), 2); + ASSERT_EQ((this->test_for<2>()('c', 42., true)), 6); + ASSERT_EQ((this->test_for()('c', 42.)), 2); } TEST(IntegralConstant, Functionalities) {