From fcdb3f77e8798f82929365f85baf72b46f9fcde0 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 16 Oct 2016 03:45:06 +0000 Subject: [PATCH] Update LWG 2767 and add test case git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284324 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../function.objects/func.not_fn/not_fn.pass.cpp | 14 ++++++++++++++ www/upcoming_meeting.html | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) 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 @@ 2759gcd / lcm and bool for the WPIssaquahPatch ready 2760non-const basic_string::data should not invalidate iteratorsIssaquahNothing to do 2765Did LWG 1123 go too far?Issaquah - 2767not_fn call_wrapper can form invalid typesIssaquah + 2767not_fn call_wrapper can form invalid typesIssaquahWe already do this 2768any_cast and move semanticsIssaquahResolved by LWG 2769 2769Redundant const in the return type of any_cast(const any&)IssaquahImplemented in trunk 2771Broken Effects of some basic_string::compare functions in terms of basic_string_viewIssaquahWe already do this @@ -204,7 +204,7 @@
  • 2759 - Patch and tests ready
  • 2760 - This is just wording cleanup; no code or test changes needed.
  • 2765 - is this just wording cleanup????? I don't think this actually requires code changes.
  • -
  • 2767 -
  • +
  • 2767 - The test case on the issue is incorrect. See not_fn.pass.cpp for the correct test case.
  • 2768 - std::any: There is no PR for this issue. It is resolved by LWG 2769.
  • 2769 - std::any: The PR looks good except that remove_reference_t<remove_cv_t<T>> should read