[libc++] Remove std::optional from ObjC is_scalar test.
authorzoecarver <z.zoelec2@gmail.com>
Wed, 8 Apr 2020 16:40:33 +0000 (09:40 -0700)
committerzoecarver <z.zoelec2@gmail.com>
Wed, 8 Apr 2020 16:44:49 +0000 (09:44 -0700)
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).

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

index dc7fdf1..65b14fb 100644 (file)
@@ -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 @@ static_assert(std::is_scalar<Foo (^)(Arg<0>, Arg<1>, Arg<2>)>::value, "");
 
 
 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;
 }