This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Don't define uses-allocator variable templates in C++11


These variable templates give warnings in C++11 mode when
-Wsystem-headers is used:

In file included from /home/jwakely/gcc/7/include/c++/7.0.0/memory:77:0,
                from vt.cc:1:
/home/jwakely/gcc/7/include/c++/7.0.0/bits/uses_allocator.h:130:20: warning: variable templates only available with -std=c++14 or -std=gnu++14
    constexpr bool __is_uses_allocator_constructible_v =
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwakely/gcc/7/include/c++/7.0.0/bits/uses_allocator.h:141:20: warning: variable templates only available with -std=c++14 or -std=gnu++14
    constexpr bool __is_nothrow_uses_allocator_constructible_v =
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We don't need them, so let's only define them for C++14 and up.

	* include/bits/uses_allocator.h (__is_uses_allocator_constructible_v)
	(__is_nothrow_uses_allocator_constructible_v): Only define for C++14
	and later.

Tested powerpc64le-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]