PR c++/91436 fix C++ dialect for std::make_unique fix-it hint
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Aug 2019 19:52:58 +0000 (20:52 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 14 Aug 2019 19:52:58 +0000 (20:52 +0100)
commit07ee59246c2f67249882e74c4c131004aad9a6da
tree787e369b4827d3cf6ee6544b42fcf8da573236bc
parent07fd852ff115a133d7ddc27a430435126f111234
PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

The std::make_unique function wasn't added until C++14, and neither was
the std::complex_literals namespace.

gcc/cp:

PR c++/91436
* name-lookup.c (get_std_name_hint): Fix min_dialect field for
complex_literals and make_unique entries.

gcc/testsuite:

PR c++/91436
* g++.dg/lookup/missing-std-include-5.C: Limit test to C++14 and up.
* g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in
test that runs for C++11.
* g++.dg/lookup/missing-std-include-8.C: Check make_unique here.

From-SVN: r274492
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/missing-std-include-5.C
gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
gcc/testsuite/g++.dg/lookup/missing-std-include-8.C