@@ -26,11 +26,10 @@ struct TraitsTest : testing::Test {
2626 using traits = folly::function_traits<S>;
2727
2828 template <typename S>
29- using result_type_t = typename traits<S>::result_type ;
29+ using result_t = typename traits<S>::result ;
3030
3131 template <typename R, typename S>
32- static constexpr bool is_result_type_v =
33- std::is_same<R, result_type_t <S>>::value;
32+ static constexpr bool is_result_v = std::is_same<R, result_t <S>>::value;
3433
3534 template <typename S>
3635 static constexpr bool is_nothrow_v = traits<S>::is_nothrow;
@@ -68,54 +67,54 @@ TEST_F(TraitsTest, function_traits) {
6867
6968 // result_type
7069
71- EXPECT_TRUE ((is_result_type_v <vc, vc ()>));
72- EXPECT_TRUE ((is_result_type_v <vc, vc () const >));
73- EXPECT_TRUE ((is_result_type_v <vc, vc () volatile >));
74- EXPECT_TRUE ((is_result_type_v <vc, vc () const volatile >));
75- EXPECT_TRUE ((is_result_type_v <vc, vc ()&>));
76- EXPECT_TRUE ((is_result_type_v <vc, vc () const &>));
77- EXPECT_TRUE ((is_result_type_v <vc, vc () volatile &>));
78- EXPECT_TRUE ((is_result_type_v <vc, vc () const volatile &>));
79- EXPECT_TRUE ((is_result_type_v <vc, vc () &&>));
80- EXPECT_TRUE ((is_result_type_v <vc, vc () const &&>));
81- EXPECT_TRUE ((is_result_type_v <vc, vc () volatile &&>));
82- EXPECT_TRUE ((is_result_type_v <vc, vc () const volatile &&>));
83- EXPECT_TRUE ((is_result_type_v <vc, vc (...)>));
84- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const >));
85- EXPECT_TRUE ((is_result_type_v <vc, vc (...) volatile >));
86- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const volatile >));
87- EXPECT_TRUE ((is_result_type_v <vc, vc (...)&>));
88- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const &>));
89- EXPECT_TRUE ((is_result_type_v <vc, vc (...) volatile &>));
90- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const volatile &>));
91- EXPECT_TRUE ((is_result_type_v <vc, vc (...) &&>));
92- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const &&>));
93- EXPECT_TRUE ((is_result_type_v <vc, vc (...) volatile &&>));
94- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const volatile &&>));
95- EXPECT_TRUE ((is_result_type_v <vc, vc () noexcept >));
96- EXPECT_TRUE ((is_result_type_v <vc, vc () const noexcept >));
97- EXPECT_TRUE ((is_result_type_v <vc, vc () volatile noexcept >));
98- EXPECT_TRUE ((is_result_type_v <vc, vc () const volatile noexcept >));
99- EXPECT_TRUE ((is_result_type_v <vc, vc () & noexcept >));
100- EXPECT_TRUE ((is_result_type_v <vc, vc () const & noexcept >));
101- EXPECT_TRUE ((is_result_type_v <vc, vc () volatile & noexcept >));
102- EXPECT_TRUE ((is_result_type_v <vc, vc () const volatile & noexcept >));
103- EXPECT_TRUE ((is_result_type_v < vc, vc () && noexcept >));
104- EXPECT_TRUE ((is_result_type_v < vc, vc () const && noexcept >));
105- EXPECT_TRUE ((is_result_type_v < vc, vc () volatile && noexcept >));
106- EXPECT_TRUE ((is_result_type_v < vc, vc () const volatile && noexcept >));
107- EXPECT_TRUE ((is_result_type_v <vc, vc (...) noexcept >));
108- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const noexcept >));
109- EXPECT_TRUE ((is_result_type_v <vc, vc (...) volatile noexcept >));
110- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const volatile noexcept >));
111- EXPECT_TRUE ((is_result_type_v <vc, vc (...) & noexcept >));
112- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const & noexcept >));
113- EXPECT_TRUE ((is_result_type_v <vc, vc (...) volatile & noexcept >));
114- EXPECT_TRUE ((is_result_type_v <vc, vc (...) const volatile & noexcept >));
115- EXPECT_TRUE ((is_result_type_v < vc, vc (...) && noexcept >));
116- EXPECT_TRUE ((is_result_type_v < vc, vc (...) const && noexcept >));
117- EXPECT_TRUE ((is_result_type_v < vc, vc (...) volatile && noexcept >));
118- EXPECT_TRUE ((is_result_type_v < vc, vc (...) const volatile && noexcept >));
70+ EXPECT_TRUE ((is_result_v <vc, vc ()>));
71+ EXPECT_TRUE ((is_result_v <vc, vc () const >));
72+ EXPECT_TRUE ((is_result_v <vc, vc () volatile >));
73+ EXPECT_TRUE ((is_result_v <vc, vc () const volatile >));
74+ EXPECT_TRUE ((is_result_v <vc, vc ()&>));
75+ EXPECT_TRUE ((is_result_v <vc, vc () const &>));
76+ EXPECT_TRUE ((is_result_v <vc, vc () volatile &>));
77+ EXPECT_TRUE ((is_result_v <vc, vc () const volatile &>));
78+ EXPECT_TRUE ((is_result_v <vc, vc () &&>));
79+ EXPECT_TRUE ((is_result_v <vc, vc () const &&>));
80+ EXPECT_TRUE ((is_result_v <vc, vc () volatile &&>));
81+ EXPECT_TRUE ((is_result_v <vc, vc () const volatile &&>));
82+ EXPECT_TRUE ((is_result_v <vc, vc (...)>));
83+ EXPECT_TRUE ((is_result_v <vc, vc (...) const >));
84+ EXPECT_TRUE ((is_result_v <vc, vc (...) volatile >));
85+ EXPECT_TRUE ((is_result_v <vc, vc (...) const volatile >));
86+ EXPECT_TRUE ((is_result_v <vc, vc (...)&>));
87+ EXPECT_TRUE ((is_result_v <vc, vc (...) const &>));
88+ EXPECT_TRUE ((is_result_v <vc, vc (...) volatile &>));
89+ EXPECT_TRUE ((is_result_v <vc, vc (...) const volatile &>));
90+ EXPECT_TRUE ((is_result_v <vc, vc (...) &&>));
91+ EXPECT_TRUE ((is_result_v <vc, vc (...) const &&>));
92+ EXPECT_TRUE ((is_result_v <vc, vc (...) volatile &&>));
93+ EXPECT_TRUE ((is_result_v <vc, vc (...) const volatile &&>));
94+ EXPECT_TRUE ((is_result_v <vc, vc () noexcept >));
95+ EXPECT_TRUE ((is_result_v <vc, vc () const noexcept >));
96+ EXPECT_TRUE ((is_result_v <vc, vc () volatile noexcept >));
97+ EXPECT_TRUE ((is_result_v <vc, vc () const volatile noexcept >));
98+ EXPECT_TRUE ((is_result_v <vc, vc () & noexcept >));
99+ EXPECT_TRUE ((is_result_v <vc, vc () const & noexcept >));
100+ EXPECT_TRUE ((is_result_v <vc, vc () volatile & noexcept >));
101+ EXPECT_TRUE ((is_result_v <vc, vc () const volatile & noexcept >));
102+ EXPECT_TRUE ((is_result_v < vc, vc () && noexcept >));
103+ EXPECT_TRUE ((is_result_v < vc, vc () const && noexcept >));
104+ EXPECT_TRUE ((is_result_v < vc, vc () volatile && noexcept >));
105+ EXPECT_TRUE ((is_result_v < vc, vc () const volatile && noexcept >));
106+ EXPECT_TRUE ((is_result_v <vc, vc (...) noexcept >));
107+ EXPECT_TRUE ((is_result_v <vc, vc (...) const noexcept >));
108+ EXPECT_TRUE ((is_result_v <vc, vc (...) volatile noexcept >));
109+ EXPECT_TRUE ((is_result_v <vc, vc (...) const volatile noexcept >));
110+ EXPECT_TRUE ((is_result_v <vc, vc (...) & noexcept >));
111+ EXPECT_TRUE ((is_result_v <vc, vc (...) const & noexcept >));
112+ EXPECT_TRUE ((is_result_v <vc, vc (...) volatile & noexcept >));
113+ EXPECT_TRUE ((is_result_v <vc, vc (...) const volatile & noexcept >));
114+ EXPECT_TRUE ((is_result_v < vc, vc (...) && noexcept >));
115+ EXPECT_TRUE ((is_result_v < vc, vc (...) const && noexcept >));
116+ EXPECT_TRUE ((is_result_v < vc, vc (...) volatile && noexcept >));
117+ EXPECT_TRUE ((is_result_v < vc, vc (...) const volatile && noexcept >));
119118
120119 // is_nothrow
121120
0 commit comments