Index: include/bits/basic_string.h =================================================================== --- include/bits/basic_string.h (revision 211078) +++ include/bits/basic_string.h (working copy) @@ -3124,6 +3124,8 @@ #if __cplusplus > 201103L +#define __cpp_lib_string_udls 201304 + inline namespace literals { inline namespace string_literals Index: include/bits/stl_algobase.h =================================================================== --- include/bits/stl_algobase.h (revision 211078) +++ include/bits/stl_algobase.h (working copy) @@ -1091,6 +1091,7 @@ } #if __cplusplus > 201103L +#define __cpp_lib_robust_nonmodifying_seq_ops 201304 /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms Index: include/bits/stl_function.h =================================================================== --- include/bits/stl_function.h (revision 211078) +++ include/bits/stl_function.h (working copy) @@ -217,6 +217,10 @@ }; #if __cplusplus > 201103L + +#define __cpp_lib_transparent_operators 201210 +#define __cpp_lib_generic_associative_lookup 201304 + template<> struct plus { Index: include/bits/unique_ptr.h =================================================================== --- include/bits/unique_ptr.h (revision 211078) +++ include/bits/unique_ptr.h (working copy) @@ -743,6 +743,9 @@ }; #if __cplusplus > 201103L + +#define __cpp_lib_make_unique 201304 + template struct _MakeUniq { typedef unique_ptr<_Tp> __single_object; }; Index: include/std/array =================================================================== --- include/std/array (revision 211078) +++ include/std/array (working copy) @@ -35,6 +35,8 @@ # include #else +#define __cpp_lib_constexpr_functions 201210 + #include #include #include Index: include/std/chrono =================================================================== --- include/std/chrono (revision 211078) +++ include/std/chrono (working copy) @@ -43,6 +43,8 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 +#define __cpp_lib_constexpr_functions 201210 + namespace std _GLIBCXX_VISIBILITY(default) { /** @@ -782,6 +784,8 @@ #if __cplusplus > 201103L +#define __cpp_lib_chrono_udls 201304 + inline namespace literals { inline namespace chrono_literals Index: include/std/complex =================================================================== --- include/std/complex (revision 211078) +++ include/std/complex (working copy) @@ -1929,6 +1929,8 @@ inline namespace literals { inline namespace complex_literals { +#define __cpp_lib_complex_udls 201309 + constexpr std::complex operator""if(long double __num) { return std::complex{0.0F, static_cast(__num)}; } Index: include/std/iomanip =================================================================== --- include/std/iomanip (revision 211078) +++ include/std/iomanip (working copy) @@ -336,6 +336,8 @@ #if __cplusplus > 201103L +#define __cpp_lib_quoted_string_io 201304 + _GLIBCXX_END_NAMESPACE_VERSION namespace __detail { _GLIBCXX_BEGIN_NAMESPACE_VERSION Index: include/std/mutex =================================================================== --- include/std/mutex (revision 211078) +++ include/std/mutex (working copy) @@ -35,6 +35,9 @@ # include #else +// For backwards compatibility of SD-6. +#define __cpp_lib_shared_mutex 201304 + #include #include #include Index: include/std/shared_mutex =================================================================== --- include/std/shared_mutex (revision 211078) +++ include/std/shared_mutex (working copy) @@ -52,6 +52,9 @@ */ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) + +#define __cpp_lib_shared_mutex 201402 + /// shared_timed_mutex class shared_timed_mutex { Index: include/std/tuple =================================================================== --- include/std/tuple (revision 211078) +++ include/std/tuple (working copy) @@ -744,6 +744,9 @@ } #if __cplusplus > 201103L + +#define __cpp_lib_tuples_by_type 201304 + template constexpr _Head& __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept Index: include/std/type_traits =================================================================== --- include/std/type_traits (revision 211078) +++ include/std/type_traits (working copy) @@ -73,6 +73,9 @@ typedef integral_constant<_Tp, __v> type; constexpr operator value_type() const { return value; } #if __cplusplus > 201103L + +#define __cpp_lib_integral_constant_callable 201304 + constexpr value_type operator()() const { return value; } #endif }; @@ -1451,6 +1454,9 @@ }; #if __cplusplus > 201103L + +#define __cpp_lib_transformation_trait_aliases 201304 + /// Alias template for remove_const template using remove_const_t = typename remove_const<_Tp>::type; @@ -2044,6 +2050,8 @@ // Sfinae-friendly result_of implementation: +#define __cpp_lib_result_of_sfinae 201210 + // [func.require] paragraph 1 bullet 1: struct __result_of_memfun_ref_impl { Index: include/std/utility =================================================================== --- include/std/utility (revision 211078) +++ include/std/utility (working copy) @@ -70,6 +70,9 @@ #include #if __cplusplus >= 201103L + +#define __cpp_lib_constexpr_functions 201210 + #include #include @@ -157,6 +160,9 @@ { return __pair_get<_Int>::__const_get(__in); } #if __cplusplus > 201103L + +#define __cpp_lib_tuples_by_type 201304 + template constexpr _Tp& get(pair<_Tp, _Up>& __p) noexcept @@ -187,6 +193,8 @@ get(pair<_Up, _Tp>&& __p) noexcept { return std::move(__p.second); } +#define __cpp_lib_exchange_function 201304 + /// Assign @p __new_val to @p __obj and return its previous value. template inline _Tp @@ -220,6 +228,9 @@ }; #if __cplusplus > 201103L + +#define __cpp_lib_integer_sequence 201304 + /// Class template integer_sequence template struct integer_sequence Index: testsuite/experimental/feat-cxx14.cc =================================================================== --- testsuite/experimental/feat-cxx14.cc (revision 0) +++ testsuite/experimental/feat-cxx14.cc (working copy) @@ -0,0 +1,113 @@ +// { dg-options "-std=gnu++14" } +// { dg-do compile } + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __cpp_lib_integer_sequence +# error "__cpp_lib_integer_sequence" +#elif __cpp_lib_integer_sequence != 201304 +# error "__cpp_lib_integer_sequence != 201304" +#endif + +#ifndef __cpp_lib_exchange_function +# error "__cpp_lib_exchange_function" +#elif __cpp_lib_exchange_function != 201304 +# error "__cpp_lib_exchange_function != 201304" +#endif + +#ifndef __cpp_lib_tuples_by_type +# error "__cpp_lib_tuples_by_type" +#elif __cpp_lib_tuples_by_type != 201304 +# error "__cpp_lib_tuples_by_type != 201304" +#endif + +#ifndef __cpp_lib_make_unique +# error "__cpp_lib_make_unique" +#elif __cpp_lib_make_unique != 201304 +# error "__cpp_lib_make_unique != 201304" +#endif + +#ifndef __cpp_lib_transparent_operators +# error "__cpp_lib_transparent_operators" +#elif __cpp_lib_transparent_operators != 201210 +# error "__cpp_lib_transparent_operators != 201210" +#endif + +#ifndef __cpp_lib_result_of_sfinae +# error "__cpp_lib_result_of_sfinae" +#elif __cpp_lib_result_of_sfinae != 201210 +# error "__cpp_lib_result_of_sfinae != 201210" +#endif + +#ifndef __cpp_lib_integral_constant_callable +# error "__cpp_lib_integral_constant_callable" +#elif __cpp_lib_integral_constant_callable != 201304 +# error "__cpp_lib_integral_constant_callable != 201304" +#endif + +#ifndef __cpp_lib_transformation_trait_aliases +# error "__cpp_lib_transformation_trait_aliases" +#elif __cpp_lib_transformation_trait_aliases != 201304 +# error "__cpp_lib_transformation_trait_aliases != 201304" +#endif + +#ifndef __cpp_lib_chrono_udls +# error "__cpp_lib_chrono_udls" +#elif __cpp_lib_chrono_udls != 201304 +# error "__cpp_lib_chrono_udls != 201304" +#endif + +#ifndef __cpp_lib_string_udls +# error "__cpp_lib_string_udls" +#elif __cpp_lib_string_udls != 201304 +# error "__cpp_lib_string_udls != 201304" +#endif + +#ifndef __cpp_lib_complex_udls +# error "__cpp_lib_complex_udls" +#elif __cpp_lib_complex_udls != 201309 +# error "__cpp_lib_complex_udls != 201309" +#endif + +#ifndef __cpp_lib_generic_associative_lookup +# error "__cpp_lib_generic_associative_lookup" +#elif __cpp_lib_generic_associative_lookup != 201304 +# error "__cpp_lib_generic_associative_lookup != 201304" +#endif + +//#ifndef __cpp_lib_null_iterators +//# error "__cpp_lib_null_iterators" +//#elif __cpp_lib_null_iterators != 201304 +//# error "__cpp_lib_null_iterators != 201304" +//#endif + +#ifndef __cpp_lib_robust_nonmodifying_seq_ops +# error "__cpp_lib_robust_nonmodifying_seq_ops" +#elif __cpp_lib_robust_nonmodifying_seq_ops != 201304 +# error "__cpp_lib_robust_nonmodifying_seq_ops != 201304" +#endif + +#ifndef __cpp_lib_quoted_string_io +# error "__cpp_lib_quoted_string_io" +#elif __cpp_lib_quoted_string_io != 201304 +# error "__cpp_lib_quoted_string_io != 201304" +#endif + +#if !__has_include() +# error "" +#endif + +#ifndef __cpp_lib_shared_mutex +# error "__cpp_lib_shared_mutex" +#elif __cpp_lib_shared_mutex != 201402 +# error "__cpp_lib_shared_mutex != 201402" +#endif Index: testsuite/experimental/feat-lib-fund.cc =================================================================== --- testsuite/experimental/feat-lib-fund.cc (revision 0) +++ testsuite/experimental/feat-lib-fund.cc (working copy) @@ -0,0 +1,25 @@ +// { dg-options "-std=gnu++14" } +// { dg-do compile } + +#include +#include + +#if !__has_include() +# error "" +#endif + +//#if !__has_include() +//# error "" +//#endif + +//#if !__has_include() +//# error "" +//#endif + +//#if !__has_include() +//# error "" +//#endif + +#if !__has_include() +# error "" +#endif