[libcxx-commits] [libcxx] 7a0dc1a - [libc++] Remove std::optional from ObjC is_scalar test.

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 8 09:45:05 PDT 2020


Author: zoecarver
Date: 2020-04-08T09:44:49-07:00
New Revision: 7a0dc1a9e77d023871e166c9d2aecf9133ddf043

URL: https://github.com/llvm/llvm-project/commit/7a0dc1a9e77d023871e166c9d2aecf9133ddf043
DIFF: https://github.com/llvm/llvm-project/commit/7a0dc1a9e77d023871e166c9d2aecf9133ddf043.diff

LOG: [libc++] Remove std::optional from ObjC is_scalar test.

std::optional requires C++17. Instead of only running the test above
C++14, this commit removes uses of std::optional from the test (it's
already tested in block.objc.pass.mm).

Added: 
    

Modified: 
    libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm b/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm
index dc7fdf1ee8f3..65b14fb13081 100644
--- a/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm
+++ b/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: c++98, c++03
 // REQUIRES: has-fblocks
 // ADDITIONAL_COMPILE_FLAGS: -fblocks
 
@@ -17,7 +17,6 @@
 // Make sure we report that blocks are scalar types.
 
 #include <type_traits>
-#include <optional>
 
 struct Foo { };
 template <int> struct Arg { };
@@ -35,8 +34,5 @@
 
 
 int main(int, char**) {
-    // Make sure that std::optional can be used with a block, which is the
-    // underlying motivation for making blocks satisfy std::is_scalar.
-    std::optional<Foo (^)(Arg<0>)> opt; (void)opt;
     return 0;
 }


        


More information about the libcxx-commits mailing list