diff --git a/libcxx/test/std/experimental/reflection/reflect-invoke.pass.cpp b/libcxx/test/std/experimental/reflection/reflect-invoke.pass.cpp index 7d66a96cd2ac36..6eeacedcaefb69 100644 --- a/libcxx/test/std/experimental/reflection/reflect-invoke.pass.cpp +++ b/libcxx/test/std/experimental/reflection/reflect-invoke.pass.cpp @@ -271,31 +271,31 @@ constexpr Number num{42}; // member function with input arguments static_assert(std::meta::reflect_value(84) == - reflect_invoke(^Number::plus, - {^num, std::meta::reflect_value(42)})); + reflect_invoke(^^Number::plus, + {^^num, std::meta::reflect_value(42)})); // operator overload static_assert(std::meta::reflect_value(84) == - reflect_invoke(^Number::get_value, - {reflect_invoke(^Number::operator+, - {^num, std::meta::reflect_value(42)})})); + reflect_invoke(^^Number::get_value, + {reflect_invoke(^^Number::operator+, + {^^num, std::meta::reflect_value(42)})})); // member function without input arguments static_assert(std::meta::reflect_value(42) == - reflect_invoke(^Number::get_value, - {^num})); + reflect_invoke(^^Number::get_value, + {^^num})); // member function called with object reference constexpr auto num_ref = # static_assert(std::meta::reflect_value(42) == - reflect_invoke(^Number::get_value, - {^num_ref})); + reflect_invoke(^^Number::get_value, + {^^num_ref})); // template member function static_assert(std::meta::reflect_value(84) == - reflect_invoke(^Number::multiply, - {^int}, - {^num, std::meta::reflect_value(2)})); + reflect_invoke(^^Number::multiply, + {^^int}, + {^^num, std::meta::reflect_value(2)})); // Invoking Base::fn() with an object of type Child struct IsReal { @@ -314,11 +314,11 @@ struct FloatNumber : public Number, IsReal{ constexpr FloatNumber childNumber{42}; static_assert(std::meta::reflect_value(42) == - reflect_invoke(^Number::get_value, - {^childNumber})); + reflect_invoke(^^Number::get_value, + {^^childNumber})); static_assert(std::meta::reflect_value(true) == - reflect_invoke(^IsReal::is_real, - {^childNumber})); + reflect_invoke(^^IsReal::is_real, + {^^childNumber})); } // namespace non_static_member_functions diff --git a/libcxx/test/std/experimental/reflection/reflect-invoke.verify.cpp b/libcxx/test/std/experimental/reflection/reflect-invoke.verify.cpp index 391be2d4ab0f27..a0499c28c6e367 100644 --- a/libcxx/test/std/experimental/reflection/reflect-invoke.verify.cpp +++ b/libcxx/test/std/experimental/reflection/reflect-invoke.verify.cpp @@ -9,7 +9,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 || c++11 || c++14 || c++17 || c++20 -// ADDITIONAL_COMPILE_FLAGS: -freflection +// ADDITIONAL_COMPILE_FLAGS: -freflection -freflection-new-syntax // ADDITIONAL_COMPILE_FLAGS: -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-unused-value // @@ -39,27 +39,27 @@ int main() { // non-static member functions // ====================== constexpr A expectedClass{}; - reflect_invoke(^A::fn, {^expectedClass}); // ok + reflect_invoke(^^A::fn, {^^expectedClass}); // ok - reflect_invoke(^A::void_fn, {^expectedClass}); + reflect_invoke(^^A::void_fn, {^^expectedClass}); // expected-error-re@-1 {{call to consteval function 'std::meta::reflect_invoke<{{.*}}>' is not a constant expression}} // expected-note@-2 {{cannot invoke reflection of void-returning function}} - reflect_invoke(^A::fn, {}); + reflect_invoke(^^A::fn, {}); // expected-error-re@-1 {{call to consteval function 'std::meta::reflect_invoke<{{.*}}>' is not a constant expression}} // expected-note@-2 {{expected related object reflection as a first argument for invoking non-static member function}} - reflect_invoke(^A::fn, {std::meta::reflect_value(42)}); + reflect_invoke(^^A::fn, {std::meta::reflect_value(42)}); // expected-error-re@-1 {{call to consteval function 'std::meta::reflect_invoke<{{.*}}>' is not a constant expression}} // expected-note@-2 {{expected related object reflection as a first argument for invoking non-static member function}} constexpr B differentClass{}; - reflect_invoke(^A::fn, {^differentClass}); + reflect_invoke(^^A::fn, {^^differentClass}); // expected-error-re@-1 {{call to consteval function 'std::meta::reflect_invoke<{{.*}}>' is not a constant expression}} // expected-note@-2 {{method is not a member of given object reflection}} constexpr NS::A differentNamespaceClass{}; - reflect_invoke(^A::fn, {^differentNamespaceClass}); + reflect_invoke(^^A::fn, {^^differentNamespaceClass}); // expected-error-re@-1 {{call to consteval function 'std::meta::reflect_invoke<{{.*}}>' is not a constant expression}} // expected-note@-2 {{method is not a member of given object reflection}} }