diff --git a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index 0688b7b06..f104385f0 100644 --- a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -580,6 +580,19 @@ void call_operator_noexcept_test() } } +void test_lwg2767() { + // See http://wg21.link/LWG2767 + struct Abstract { virtual void f() const = 0; }; + struct Derived : public Abstract { void f() const {} }; + struct F { bool operator()(Abstract&&) { return false; } }; + { + Derived d; + Abstract &a = d; + bool b = std::not_fn(F{})(std::move(a)); + assert(b); + } +} + int main() { constructor_tests(); @@ -589,4 +602,5 @@ int main() call_operator_sfinae_test(); // somewhat of an extension call_operator_forwarding_test(); call_operator_noexcept_test(); + test_lwg2767(); } diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html index 1fc56e8e4..30b04f9a1 100644 --- a/www/upcoming_meeting.html +++ b/www/upcoming_meeting.html @@ -126,7 +126,7 @@
remove_reference_t<remove_cv_t<T>>
should read