From: Eric Fiselier Date: Sun, 16 Oct 2016 03:45:06 +0000 (+0000) Subject: Update LWG 2767 and add test case X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f72aaff994ee995360817244def4db1579f0cd7a;p=platform%2Fupstream%2Fllvm.git Update LWG 2767 and add test case llvm-svn: 284324 --- diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index 0688b7b..f104385 100644 --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/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/libcxx/www/upcoming_meeting.html b/libcxx/www/upcoming_meeting.html index 1fc56e8..30b04f9 100644 --- a/libcxx/www/upcoming_meeting.html +++ b/libcxx/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