]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/91436 fix C++ dialect for std::make_unique fix-it hint
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Aug 2019 20:10:00 +0000 (21:10 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 14 Aug 2019 20:10:00 +0000 (21:10 +0100)
commit10e3d230ddb1cf6311ece9d90d84b9d24843e718
tree2b112ea8d047e4707c3b0956778a0ae29d6dcbda
parentd5c39366b69c199df0a689212304ddbafbcf3d27
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: r274493
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