Fix optional deduction guide test breakage

llvm-svn: 333308
This commit is contained in:
JF Bastien 2018-05-25 20:43:57 +00:00
parent f92ca01e42
commit fc53b60a14
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ int main()
// Test the implicit deduction guides
{
// optional()
std::optional opt; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'optional'}}
std::optional opt; // expected-error {{declaration of variable 'opt' with deduced type 'std::optional' requires an initializer}}
}
{

View File

@ -45,7 +45,7 @@ int main()
// optional(const optional &);
std::optional<char> source('A');
std::optional opt(source);
static_assert(std::is_same_v<decltype(opt), std::optional<char>>, "");
static_assert(std::is_same_v<decltype(opt), std::optional<std::optional<char>>>, "");
assert(static_cast<bool>(opt) == static_cast<bool>(source));
assert(*opt == *source);
}