NMEA: make nmeatool available with/without ENABLE_IO
[marnav.git] / test / nmea / type_traits_helper.hpp
blob0949523b6cb38ff1966092e316a28ae1c69d665f
1 #ifndef TEST_TYPE_TRAITS_HELPER_HPP
2 #define TEST_TYPE_TRAITS_HELPER_HPP
4 #include <gtest/gtest.h>
5 #include <type_traits>
7 namespace
9 template <class T>
10 void nmea_sentence_traits()
12 using type = T;
14 // construction
16 EXPECT_TRUE(std::is_constructible<type>::value);
17 // EXPECT_TRUE(std::is_trivially_constructible<type>::value);
18 EXPECT_TRUE(std::is_default_constructible<type>::value);
19 EXPECT_FALSE(std::is_nothrow_constructible<type>::value);
20 EXPECT_TRUE(std::is_copy_constructible<type>::value);
21 // EXPECT_TRUE(std::is_trivially_copy_constructible<type>::value);
22 EXPECT_TRUE(std::is_move_constructible<type>::value);
24 // destruction
26 EXPECT_TRUE(std::is_destructible<type>::value);
28 // assignable
30 EXPECT_TRUE(std::is_copy_assignable<type>::value);
31 EXPECT_FALSE(std::is_nothrow_copy_assignable<type>::value);
32 // EXPECT_TRUE(std::is_trivially_copy_assignable<type>::value);
33 EXPECT_TRUE(std::is_move_assignable<type>::value);
37 #endif