8template <
typename BaseT>
26template <
typename ThingT>
27auto g(
const ThingT &t)
47inline auto f(
const int t)
65 EXPECT_TRUE(a ==
Thing1(~1u));
77 EXPECT_TRUE(a ==
Thing1(3));
78 EXPECT_TRUE(b ==
Thing1(2));
91 EXPECT_TRUE((std::is_same_v<
decltype(x),
Thing1>));
93 EXPECT_TRUE((a | b) ==
Thing1(3));
94 EXPECT_TRUE((a | b | c) ==
Thing1(3));
95 EXPECT_TRUE((a | b | c | d) ==
Thing1(7));
105 EXPECT_FALSE(a == b);
109 EXPECT_TRUE(a ==
Thing1(0));
110 EXPECT_TRUE(b ==
Thing1(2));
119 EXPECT_FALSE(a == b);
122 EXPECT_TRUE((std::is_same_v<
decltype(x),
Thing1>));
124 EXPECT_TRUE((a & b) ==
Thing1(0));
125 EXPECT_TRUE((a & c) ==
Thing1(1));
126 EXPECT_TRUE((b & c) ==
Thing1(2));
128 EXPECT_EQ(
f(a & c),
Thing1(2));
CRTP type designed to allow creation of strong types based on intrinsics.
constexpr value_type get() const noexcept
Getter for the underlying value.
TEST(IntrinsicType, overload1)
IntrinsicType< BaseT, unsigned int > IntrinsicInt