File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
libcxx/test/libcxx/utilities/function.objects/func.not.fn Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1717
1818struct NonEmptyFunctionObject {
1919 bool val = true ;
20- bool operator ()() const ; // not defined
20+ bool operator ()() const ;
21+ };
22+
23+ bool func ();
24+
25+ struct SomeClass {
26+ bool member_object;
27+ bool member_function ();
2128};
2229
2330using ResultWithEmptyFuncObject = decltype (std::not_fn<std::false_type{}>());
2431static_assert (std::is_empty_v<ResultWithEmptyFuncObject>);
2532
2633using ResultWithNotEmptyFuncObject = decltype (std::not_fn<NonEmptyFunctionObject{}>());
2734static_assert (std::is_empty_v<ResultWithNotEmptyFuncObject>);
35+
36+ using ResultWithFunctionPointer = decltype (std::not_fn<&func>());
37+ static_assert (std::is_empty_v<ResultWithFunctionPointer>);
38+
39+ using ResultWithMemberObjectPointer = decltype (std::not_fn<&SomeClass::member_object>());
40+ static_assert (std::is_empty_v<ResultWithMemberObjectPointer>);
41+
42+ using ResultWithMemberFunctionPointer = decltype (std::not_fn<&SomeClass::member_function>());
43+ static_assert (std::is_empty_v<ResultWithMemberFunctionPointer>);
You can’t perform that action at this time.
0 commit comments