Skip to content

Commit b23a4b1

Browse files
committed
Format deduct.verify
1 parent 9f57c4c commit b23a4b1

File tree

1 file changed

+16
-16
lines changed
  • libcxx/test/std/utilities/optional/optional.object/optional.object.ctor

1 file changed

+16
-16
lines changed

libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14
9+
// REQUIREd: std-at-least-c++17
1010

1111
// <optional>
1212

1313
// template<class T>
1414
// optional(T) -> optional<T>;
1515

16-
#include <optional>
1716
#include <cassert>
17+
#include <optional>
1818

1919
struct A {};
2020

21-
int main(int, char**)
22-
{
23-
// Test the explicit deduction guides
24-
25-
// Test the implicit deduction guides
26-
{
27-
// optional()
28-
std::optional opt; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}optional'}}
29-
}
30-
31-
{
32-
// optional(nullopt_t)
33-
std::optional opt(std::nullopt); // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
34-
}
21+
int main(int, char**) {
22+
// Test the implicit deduction guides
23+
{
24+
// optional()
25+
std::optional
26+
opt; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}optional'}}
27+
}
28+
29+
{
30+
// optional(nullopt_t)
31+
std::optional opt(
32+
std::
33+
nullopt); // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
34+
}
3535

3636
return 0;
3737
}

0 commit comments

Comments
 (0)