You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
intmain(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}}
0 commit comments