diff mbox

Inline Variables for the Standard Library (p0607r0)

Message ID 20170323174514.GF4425@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely March 23, 2017, 5:45 p.m. UTC
On 12/03/17 01:04 +0100, Daniel Krügler wrote:
>2017-03-11 23:14 GMT+01:00 Daniel Krügler <daniel.kruegler@gmail.com>:
>> 2017-03-11 23:09 GMT+01:00 Tim Song <t.canens.cpp@gmail.com>:
>>> On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler
>>> <daniel.kruegler@gmail.com> wrote:
>>>> 2017-03-11 21:23 GMT+01:00 Tim Song <t.canens.cpp@gmail.com>:
>>>>> On Sat, Mar 11, 2017 at 1:32 PM, Daniel Krügler
>>>>> <daniel.kruegler@gmail.com> wrote:
>>>>>> This patch applies inline to all namespace scope const variables
>>>>>> according to options A and B2 voted in during the Kona meeting, see:
>>>>>>
>>>>>> http://wiki.edg.com/pub/Wg21kona2017/StrawPolls/p0607r0.html
>>>>>>
>>>>>> During that work it has been found that std::ignore was not declared
>>>>>> constexpr (http://cplusplus.github.io/LWG/lwg-defects.html#2773),
>>>>>> which was fixed as well.
>>>>>
>>>>> Just adding constexpr to std::ignore does ~nothing. The assignment
>>>>> operator needs to be made constexpr too; there is really no other
>>>>> reason to use std::ignore.
>>>>
>>>> There is nothing in the resolution of the issue (Nor in the discussion
>>>> that argues for the change) that says so. Yes, I considered to make
>>>> the assignment function template constexpr, but decided against it,
>>>> because the wording of the issue doesn't have this requirement). I'm
>>>> also aware of a test-case which would show the difference, but again:
>>>> This was not what the issue said. In fact I'm in the process to open a
>>>> new library issue that should impose that additional requirement.
>>>>
>>>> - Daniel
>>>
>>> Well, technically speaking, the issue resolution doesn't even
>>> guarantee that the use case mentioned in the issue would compile since
>>> the standard says nothing about whether the copy constructor of
>>> decltype(std::ignore) is constexpr, or even whether it can be copied
>>> at all. Yes, std::ignore is underspecified, but I'm not sure I see the
>>> point in waiting; it's a completely conforming change and IMHO the
>>> issue's intent is clearly to make std::ignore fully usable in
>>> constexpr functions.
>>>
>>> Also, the only specification we have for std::ignore's semantics is
>>> "when an argument in t is ignore, assigning any value to the
>>> corresponding tuple element has no effect". I think one can argue that
>>> "causes an expression to be non-constant" is an "effect".
>>>
>>> Re "new library issue", we already have issue 2933.
>>
>> Good point, it already exists ;-)
>
>Revised patch attached.

The patch had a couple of typos, "onstexpr" in one place, and using
_GLIBCXX17_CONSTEXPR instead of _GLIBCXX17_INLINE in another file.

Here's what I've tested and am going to commit.

Comments

Tim Song March 23, 2017, 5:47 p.m. UTC | #1
On Thu, Mar 23, 2017 at 1:45 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
> + // NOTE: This makes use of the fact that we know how moveable
> + // is implemented on pair, and also vector. If the implementation
> + // changes this test may begin to fail.

Maybe drop this comment?
Jonathan Wakely March 23, 2017, 5:54 p.m. UTC | #2
On 23/03/17 13:47 -0400, Tim Song wrote:
>On Thu, Mar 23, 2017 at 1:45 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
>> + // NOTE: This makes use of the fact that we know how moveable
>> + // is implemented on pair, and also vector. If the implementation
>> + // changes this test may begin to fail.
>
>Maybe drop this comment?

Ha, yes, I'll do so. Thanks.
diff mbox

Patch

commit e17662621cde44bc6d367fafdba4b4f05f74df05
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Mar 23 11:22:48 2017 +0000

    Implement P0607R0 "Inline Variables for Standard Library" for C++17
    
    2017-03-23  Daniel Kruegler  <daniel.kruegler@gmail.com>
    
    	* include/bits/c++config (_GLIBCXX17_INLINE): Define.
    	* include/bits/regex_constants.h (All std::regex_constants constants):
    	Add _GLIBCXX17_INLINE as per P0607R0.
    	* include/bits/std_mutex.h (defer_lock, try_to_lock, adopt_lock):
    	Likewise.
    	* include/bits/stl_pair.h (piecewise_construct): Likewise.
    	* include/bits/uses_allocator.h (allocator_arg, uses_allocator_v)
    	(__is_uses_allocator_constructible_v)
    	(__is_nothrow_uses_allocator_constructible_v): Likewise.
    	* include/std/chrono (treat_as_floating_point_v): Likewise.
    	* include/std/functional (is_bind_expression_v, is_placeholder_v):
    	Likewise.
    	* include/std/optional (nullopt): Likewise.
    	* include/std/ratio (ratio_equal_v, ratio_not_equal_v, ratio_less_v)
    	ratio_less_equal_v, ratio_greater_v, ratio_greater_equal_v): Likewise.
    	* include/std/system_error (is_error_code_enum_v)
    	(is_error_condition_enum_v): Likewise.
    	* include/std/tuple (tuple_size_v, ignore): Likewise.
    	(ignore): Declare ignore constexpr as per LWG 2773, declare assignment
    	constexpr as per LWG 2933.
    	* include/std/type_traits (All variable templates): Add
    	_GLIBCXX17_INLINE as per P0607R0.
    	* include/std/variant (variant_size_v, variant_npos, __index_of_v)
    	(__tuple_count_v, __exactly_once): Likewise.
    	* testsuite/18_support/headers/new/synopsis.cc
    	(hardware_destructive_interference_size)
    	(hardware_constructive_interference_size): Likewise for commented-out
    	variables.
    	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Add new
    	test function for constexpr std::ignore (LWG 2773).
    	* testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc: New
    	test for LWG 2933.

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 3b694e0..8ca6b03 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -122,6 +122,14 @@ 
 # endif
 #endif
 
+#ifndef _GLIBCXX17_INLINE
+# if __cplusplus > 201402L
+#  define _GLIBCXX17_INLINE inline
+# else
+#  define _GLIBCXX17_INLINE
+# endif
+#endif
+
 // Macro for noexcept, to support in mixed 03/0x mode.
 #ifndef _GLIBCXX_NOEXCEPT
 # if __cplusplus >= 201103L
diff --git a/libstdc++-v3/include/bits/regex_constants.h b/libstdc++-v3/include/bits/regex_constants.h
index 741b783..dad2d63 100644
--- a/libstdc++-v3/include/bits/regex_constants.h
+++ b/libstdc++-v3/include/bits/regex_constants.h
@@ -84,7 +84,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * Specifies that the matching of regular expressions against a character
    * sequence shall be performed without regard to case.
    */
-  constexpr syntax_option_type icase =
+  _GLIBCXX17_INLINE constexpr syntax_option_type icase =
     static_cast<syntax_option_type>(1 << _S_icase);
 
   /**
@@ -92,7 +92,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * container sequence, no sub-expression matches are to be stored in the
    * supplied match_results structure.
    */
-  constexpr syntax_option_type nosubs =
+  _GLIBCXX17_INLINE constexpr syntax_option_type nosubs =
     static_cast<syntax_option_type>(1 << _S_nosubs);
 
   /**
@@ -101,14 +101,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * speed with which regular expression objects are constructed. Otherwise
    * it has no detectable effect on the program output.
    */
-  constexpr syntax_option_type optimize =
+  _GLIBCXX17_INLINE constexpr syntax_option_type optimize =
     static_cast<syntax_option_type>(1 << _S_optimize);
 
   /**
    * Specifies that character ranges of the form [a-b] should be locale
    * sensitive.
    */
-  constexpr syntax_option_type collate =
+  _GLIBCXX17_INLINE constexpr syntax_option_type collate =
     static_cast<syntax_option_type>(1 << _S_collate);
 
   /**
@@ -119,7 +119,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * in the PERL scripting language but extended with elements found in the
    * POSIX regular expression grammar.
    */
-  constexpr syntax_option_type ECMAScript =
+  _GLIBCXX17_INLINE constexpr syntax_option_type ECMAScript =
     static_cast<syntax_option_type>(1 << _S_ECMAScript);
 
   /**
@@ -129,7 +129,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * Headers, Section 9, Regular Expressions [IEEE, Information Technology --
    * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
    */
-  constexpr syntax_option_type basic =
+  _GLIBCXX17_INLINE constexpr syntax_option_type basic =
     static_cast<syntax_option_type>(1 << _S_basic);
 
   /**
@@ -138,7 +138,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * Portable Operating System Interface (POSIX), Base Definitions and
    * Headers, Section 9, Regular Expressions.
    */
-  constexpr syntax_option_type extended =
+  _GLIBCXX17_INLINE constexpr syntax_option_type extended =
     static_cast<syntax_option_type>(1 << _S_extended);
 
   /**
@@ -149,7 +149,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,,
    * and \\ddd (where ddd is one, two, or three octal digits).
    */
-  constexpr syntax_option_type awk =
+  _GLIBCXX17_INLINE constexpr syntax_option_type awk =
     static_cast<syntax_option_type>(1 << _S_awk);
 
   /**
@@ -158,7 +158,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * identical to syntax_option_type basic, except that newlines are treated
    * as whitespace.
    */
-  constexpr syntax_option_type grep =
+  _GLIBCXX17_INLINE constexpr syntax_option_type grep =
     static_cast<syntax_option_type>(1 << _S_grep);
 
   /**
@@ -167,7 +167,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * IEEE Std 1003.1-2001.  This option is identical to syntax_option_type
    * extended, except that newlines are treated as whitespace.
    */
-  constexpr syntax_option_type egrep =
+  _GLIBCXX17_INLINE constexpr syntax_option_type egrep =
     static_cast<syntax_option_type>(1 << _S_egrep);
 
   /**
@@ -176,7 +176,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * If specified in a regex with back-references, the exception
    * regex_constants::error_complexity will be thrown.
    */
-  constexpr syntax_option_type __polynomial =
+  _GLIBCXX17_INLINE constexpr syntax_option_type __polynomial =
     static_cast<syntax_option_type>(1 << _S_polynomial);
 
   constexpr inline syntax_option_type
@@ -257,14 +257,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /**
    * The default matching rules.
    */
-  constexpr match_flag_type match_default = static_cast<match_flag_type>(0);
+  _GLIBCXX17_INLINE constexpr match_flag_type match_default =
+    static_cast<match_flag_type>(0);
 
   /**
    * The first character in the sequence [first, last) is treated as though it
    * is not at the beginning of a line, so the character (^) in the regular
    * expression shall not match [first, first).
    */
-  constexpr match_flag_type match_not_bol =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_not_bol =
     static_cast<match_flag_type>(1 << _S_not_bol);
 
   /**
@@ -272,40 +273,40 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * is not at the end of a line, so the character ($) in the regular
    * expression shall not match [last, last).
    */
-  constexpr match_flag_type match_not_eol =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_not_eol =
     static_cast<match_flag_type>(1 << _S_not_eol);
 
   /**
    * The expression \\b is not matched against the sub-sequence
    * [first,first).
    */
-  constexpr match_flag_type match_not_bow =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_not_bow =
     static_cast<match_flag_type>(1 << _S_not_bow);
 
   /**
    * The expression \\b should not be matched against the sub-sequence
    * [last,last).
    */
-  constexpr match_flag_type match_not_eow =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_not_eow =
     static_cast<match_flag_type>(1 << _S_not_eow);
 
   /**
    * If more than one match is possible then any match is an acceptable
    * result.
    */
-  constexpr match_flag_type match_any =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_any =
     static_cast<match_flag_type>(1 << _S_any);
 
   /**
    * The expression does not match an empty sequence.
    */
-  constexpr match_flag_type match_not_null =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_not_null =
     static_cast<match_flag_type>(1 << _S_not_null);
 
   /**
    * The expression only matches a sub-sequence that begins at first .
    */
-  constexpr match_flag_type match_continuous =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_continuous =
     static_cast<match_flag_type>(1 << _S_continuous);
 
   /**
@@ -313,7 +314,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * flags match_not_bol and match_not_bow are ignored by the regular
    * expression algorithms 28.11 and iterators 28.12.
    */
-  constexpr match_flag_type match_prev_avail =
+  _GLIBCXX17_INLINE constexpr match_flag_type match_prev_avail =
     static_cast<match_flag_type>(1 << _S_prev_avail);
 
   /**
@@ -342,7 +343,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    *         undefined, use the empty string instead. If
    *         nn > match_results::size(), the result is implementation-defined.
    */
-  constexpr match_flag_type format_default = static_cast<match_flag_type>(0);
+  _GLIBCXX17_INLINE constexpr match_flag_type format_default =
+    static_cast<match_flag_type>(0);
 
   /**
    * When a regular expression match is to be replaced by a new string, the
@@ -350,7 +352,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable
    * Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
    */
-  constexpr match_flag_type format_sed =
+  _GLIBCXX17_INLINE constexpr match_flag_type format_sed =
     static_cast<match_flag_type>(1 << _S_sed);
 
   /**
@@ -358,14 +360,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * container sequence being searched that do not match the regular
    * expression shall not be copied to the output string.
    */
-  constexpr match_flag_type format_no_copy =
+  _GLIBCXX17_INLINE constexpr match_flag_type format_no_copy =
     static_cast<match_flag_type>(1 << _S_no_copy);
 
   /**
    * When specified during a search and replace operation, only the first
    * occurrence of the regular expression shall be replaced.
    */
-  constexpr match_flag_type format_first_only =
+  _GLIBCXX17_INLINE constexpr match_flag_type format_first_only =
     static_cast<match_flag_type>(1 << _S_first_only);
 
   constexpr inline match_flag_type
diff --git a/libstdc++-v3/include/bits/std_mutex.h b/libstdc++-v3/include/bits/std_mutex.h
index a434ee6..17d55f5 100644
--- a/libstdc++-v3/include/bits/std_mutex.h
+++ b/libstdc++-v3/include/bits/std_mutex.h
@@ -139,13 +139,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   struct adopt_lock_t { explicit adopt_lock_t() = default; };
 
   /// Tag used to prevent a scoped lock from acquiring ownership of a mutex.
-  constexpr defer_lock_t	defer_lock { };
+  _GLIBCXX17_INLINE constexpr defer_lock_t	defer_lock { };
 
   /// Tag used to prevent a scoped lock from blocking if a mutex is locked.
-  constexpr try_to_lock_t	try_to_lock { };
+  _GLIBCXX17_INLINE constexpr try_to_lock_t	try_to_lock { };
 
   /// Tag used to make a scoped lock take ownership of a locked mutex.
-  constexpr adopt_lock_t	adopt_lock { };
+  _GLIBCXX17_INLINE constexpr adopt_lock_t	adopt_lock { };
 
   /** @brief A simple scoped lock type.
    *
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index 66f52b3..7c7cee2 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -76,7 +76,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
 
   /// piecewise_construct
-  constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
+  _GLIBCXX17_INLINE constexpr piecewise_construct_t piecewise_construct =
+    piecewise_construct_t();
 
   // Forward declarations.
   template<typename...>
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index 8dd2adb..89d4e43 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -45,7 +45,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /// [allocator.tag]
   struct allocator_arg_t { explicit allocator_arg_t() = default; };
 
-  constexpr allocator_arg_t allocator_arg = allocator_arg_t();
+  _GLIBCXX17_INLINE constexpr allocator_arg_t allocator_arg =
+    allocator_arg_t();
 
   template<typename _Tp, typename _Alloc, typename = __void_t<>>
     struct __uses_allocator_helper
@@ -110,7 +111,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 #if __cplusplus > 201402L
   template <typename _Tp, typename _Alloc>
-    constexpr bool uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
+    inline constexpr bool uses_allocator_v =
+      uses_allocator<_Tp, _Alloc>::value;
 #endif // C++17
 
   template<template<typename...> class _Predicate,
@@ -128,7 +130,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus >= 201402L
   template<typename _Tp, typename _Alloc, typename... _Args>
-    constexpr bool __is_uses_allocator_constructible_v =
+    _GLIBCXX17_INLINE constexpr bool __is_uses_allocator_constructible_v =
       __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
 #endif // C++14
 
@@ -141,7 +143,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus >= 201402L
   template<typename _Tp, typename _Alloc, typename... _Args>
-    constexpr bool __is_nothrow_uses_allocator_constructible_v =
+    _GLIBCXX17_INLINE constexpr bool
+    __is_nothrow_uses_allocator_constructible_v =
       __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
 #endif // C++14
 
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index b3dc430..c3a6ba8 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -211,7 +211,7 @@  _GLIBCXX_END_NAMESPACE_VERSION
 
 #if __cplusplus > 201402L
     template <typename _Rep>
-      constexpr bool treat_as_floating_point_v =
+      inline constexpr bool treat_as_floating_point_v =
         treat_as_floating_point<_Rep>::value;
 #endif // C++17
 
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 3db10ca..0661253 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -242,9 +242,9 @@  _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)
     { };
 
 #if __cplusplus > 201402L
-  template <typename _Tp> constexpr bool is_bind_expression_v
+  template <typename _Tp> inline constexpr bool is_bind_expression_v
     = is_bind_expression<_Tp>::value;
-  template <typename _Tp> constexpr int is_placeholder_v
+  template <typename _Tp> inline constexpr int is_placeholder_v
     = is_placeholder<_Tp>::value;
 #endif // C++17
 
diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional
index 3f540ec..24802bf 100644
--- a/libstdc++-v3/include/std/optional
+++ b/libstdc++-v3/include/std/optional
@@ -69,7 +69,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   };
 
   /// Tag to disengage optional objects.
-  constexpr nullopt_t nullopt { nullopt_t::_Construct::_Token };
+  inline constexpr nullopt_t nullopt { nullopt_t::_Construct::_Token };
 
   /**
    *  @brief Exception class thrown when a disengaged optional object is
diff --git a/libstdc++-v3/include/std/ratio b/libstdc++-v3/include/std/ratio
index 0d4d564..421f6a8 100644
--- a/libstdc++-v3/include/std/ratio
+++ b/libstdc++-v3/include/std/ratio
@@ -403,17 +403,18 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus > 201402L
   template <typename _R1, typename _R2>
-    constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value;
+    inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value;
   template <typename _R1, typename _R2>
-    constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value;
+    inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value;
   template <typename _R1, typename _R2>
-    constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value;
+    inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value;
   template <typename _R1, typename _R2>
-    constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value;
+    inline constexpr bool ratio_less_equal_v =
+      ratio_less_equal<_R1, _R2>::value;
   template <typename _R1, typename _R2>
-    constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value;
+    inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value;
   template <typename _R1, typename _R2>
-    constexpr bool ratio_greater_equal_v
+    inline constexpr bool ratio_greater_equal_v
     = ratio_greater_equal<_R1, _R2>::value;
 #endif // C++17
 
diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error
index 7c2c134..6775a6e 100644
--- a/libstdc++-v3/include/std/system_error
+++ b/libstdc++-v3/include/std/system_error
@@ -62,9 +62,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus > 201402L
   template <typename _Tp>
-    constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
+    inline constexpr bool is_error_code_enum_v =
+      is_error_code_enum<_Tp>::value;
   template <typename _Tp>
-    constexpr bool is_error_condition_enum_v =
+    inline constexpr bool is_error_condition_enum_v =
       is_error_condition_enum<_Tp>::value;
 #endif // C++17
   inline namespace _V2 {
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index ae495d9..9f54579 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -1268,7 +1268,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus > 201402L
   template <typename _Tp>
-    constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
+    inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
 #endif
 
   /**
@@ -1609,17 +1609,18 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
 #endif
 
-  // A class (and instance) which can be used in 'tie' when an element
-  // of a tuple is not required
+  // A class (and instance) which can be used in 'tie' when an element of a
+  // tuple is not required, including better constexpr support by LWG 2933.
   struct _Swallow_assign
   {
     template<class _Tp>
-      const _Swallow_assign&
+      _GLIBCXX14_CONSTEXPR const _Swallow_assign&
       operator=(const _Tp&) const
       { return *this; }
   };
 
-  const _Swallow_assign ignore{};
+  // See p0607r0 and LWG 2773.
+  _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{};
 
   /// Partial specialization for tuples
   template<typename... _Types, typename _Alloc>
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 7d067ca..6707caa 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -174,15 +174,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { };
 
   template<typename... _Bn>
-    constexpr bool conjunction_v
+    inline constexpr bool conjunction_v
     = conjunction<_Bn...>::value;
 
   template<typename... _Bn>
-    constexpr bool disjunction_v
+    inline constexpr bool disjunction_v
     = disjunction<_Bn...>::value;
 
   template<typename _Pp>
-    constexpr bool negation_v
+    inline constexpr bool negation_v
     = negation<_Pp>::value;
 
 #endif
@@ -2656,11 +2656,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus >= 201402L
   /// is_swappable_v
   template<typename _Tp>
-    constexpr bool is_swappable_v = is_swappable<_Tp>::value;
+    _GLIBCXX17_INLINE constexpr bool is_swappable_v =
+      is_swappable<_Tp>::value;
 
   /// is_nothrow_swappable_v
   template<typename _Tp>
-    constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
+    _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_v =
+      is_nothrow_swappable<_Tp>::value;
 #endif // __cplusplus >= 201402L
 
   namespace __swappable_with_details {
@@ -2738,11 +2740,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus >= 201402L
   /// is_swappable_with_v
   template<typename _Tp, typename _Up>
-    constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
+    _GLIBCXX17_INLINE constexpr bool is_swappable_with_v =
+      is_swappable_with<_Tp, _Up>::value;
 
   /// is_nothrow_swappable_with_v
   template<typename _Tp, typename _Up>
-    constexpr bool is_nothrow_swappable_with_v =
+    _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_with_v =
       is_nothrow_swappable_with<_Tp, _Up>::value;
 #endif // __cplusplus >= 201402L
 
@@ -2884,155 +2887,161 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus > 201402L
 # define __cpp_lib_type_trait_variable_templates 201510L
 template <typename _Tp>
-  constexpr bool is_void_v = is_void<_Tp>::value;
+  inline constexpr bool is_void_v = is_void<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
+  inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_integral_v = is_integral<_Tp>::value;
+  inline constexpr bool is_integral_v = is_integral<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_floating_point_v = is_floating_point<_Tp>::value;
+  inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_array_v = is_array<_Tp>::value;
+  inline constexpr bool is_array_v = is_array<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_pointer_v = is_pointer<_Tp>::value;
+  inline constexpr bool is_pointer_v = is_pointer<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value;
+  inline constexpr bool is_lvalue_reference_v =
+    is_lvalue_reference<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value;
+  inline constexpr bool is_rvalue_reference_v =
+    is_rvalue_reference<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_member_object_pointer_v =
+  inline constexpr bool is_member_object_pointer_v =
     is_member_object_pointer<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_member_function_pointer_v =
+  inline constexpr bool is_member_function_pointer_v =
     is_member_function_pointer<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_enum_v = is_enum<_Tp>::value;
+  inline constexpr bool is_enum_v = is_enum<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_union_v = is_union<_Tp>::value;
+  inline constexpr bool is_union_v = is_union<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_class_v = is_class<_Tp>::value;
+  inline constexpr bool is_class_v = is_class<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_function_v = is_function<_Tp>::value;
+  inline constexpr bool is_function_v = is_function<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_reference_v = is_reference<_Tp>::value;
+  inline constexpr bool is_reference_v = is_reference<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value;
+  inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_fundamental_v = is_fundamental<_Tp>::value;
+  inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_object_v = is_object<_Tp>::value;
+  inline constexpr bool is_object_v = is_object<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_scalar_v = is_scalar<_Tp>::value;
+  inline constexpr bool is_scalar_v = is_scalar<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_compound_v = is_compound<_Tp>::value;
+  inline constexpr bool is_compound_v = is_compound<_Tp>::value;
 template <typename _Tp>
- constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value;
+  inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_const_v = is_const<_Tp>::value;
+  inline constexpr bool is_const_v = is_const<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_volatile_v = is_volatile<_Tp>::value;
+  inline constexpr bool is_volatile_v = is_volatile<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivial_v = is_trivial<_Tp>::value;
+  inline constexpr bool is_trivial_v = is_trivial<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value;
+  inline constexpr bool is_trivially_copyable_v =
+    is_trivially_copyable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value;
+  inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_pod_v = is_pod<_Tp>::value;
+  inline constexpr bool is_pod_v = is_pod<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
+  inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_empty_v = is_empty<_Tp>::value;
+  inline constexpr bool is_empty_v = is_empty<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value;
+  inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_abstract_v = is_abstract<_Tp>::value;
+  inline constexpr bool is_abstract_v = is_abstract<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_final_v = is_final<_Tp>::value;
+  inline constexpr bool is_final_v = is_final<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_signed_v = is_signed<_Tp>::value;
+  inline constexpr bool is_signed_v = is_signed<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_unsigned_v = is_unsigned<_Tp>::value;
+  inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value;
 template <typename _Tp, typename... _Args>
-  constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value;
+  inline constexpr bool is_constructible_v =
+    is_constructible<_Tp, _Args...>::value;
 template <typename _Tp>
-  constexpr bool is_default_constructible_v =
+  inline constexpr bool is_default_constructible_v =
     is_default_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value;
+  inline constexpr bool is_copy_constructible_v =
+    is_copy_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value;
+  inline constexpr bool is_move_constructible_v =
+    is_move_constructible<_Tp>::value;
 template <typename _Tp, typename _Up>
-  constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value;
+  inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value;
 template <typename _Tp>
-  constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
+  inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value;
+  inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_destructible_v = is_destructible<_Tp>::value;
+  inline constexpr bool is_destructible_v = is_destructible<_Tp>::value;
 template <typename _Tp, typename... _Args>
-  constexpr bool is_trivially_constructible_v =
+  inline constexpr bool is_trivially_constructible_v =
     is_trivially_constructible<_Tp, _Args...>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_default_constructible_v =
+  inline constexpr bool is_trivially_default_constructible_v =
     is_trivially_default_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_copy_constructible_v =
+  inline constexpr bool is_trivially_copy_constructible_v =
     is_trivially_copy_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_move_constructible_v =
+  inline constexpr bool is_trivially_move_constructible_v =
     is_trivially_move_constructible<_Tp>::value;
 template <typename _Tp, typename _Up>
-  constexpr bool is_trivially_assignable_v =
+  inline constexpr bool is_trivially_assignable_v =
     is_trivially_assignable<_Tp, _Up>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_copy_assignable_v =
+  inline constexpr bool is_trivially_copy_assignable_v =
     is_trivially_copy_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_move_assignable_v =
+  inline constexpr bool is_trivially_move_assignable_v =
     is_trivially_move_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_trivially_destructible_v =
+  inline constexpr bool is_trivially_destructible_v =
     is_trivially_destructible<_Tp>::value;
 template <typename _Tp, typename... _Args>
-  constexpr bool is_nothrow_constructible_v =
+  inline constexpr bool is_nothrow_constructible_v =
     is_nothrow_constructible<_Tp, _Args...>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_default_constructible_v =
+  inline constexpr bool is_nothrow_default_constructible_v =
     is_nothrow_default_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_copy_constructible_v =
+  inline constexpr bool is_nothrow_copy_constructible_v =
     is_nothrow_copy_constructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_move_constructible_v =
+  inline constexpr bool is_nothrow_move_constructible_v =
     is_nothrow_move_constructible<_Tp>::value;
 template <typename _Tp, typename _Up>
-  constexpr bool is_nothrow_assignable_v =
+  inline constexpr bool is_nothrow_assignable_v =
     is_nothrow_assignable<_Tp, _Up>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_copy_assignable_v =
+  inline constexpr bool is_nothrow_copy_assignable_v =
     is_nothrow_copy_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_move_assignable_v =
+  inline constexpr bool is_nothrow_move_assignable_v =
     is_nothrow_move_assignable<_Tp>::value;
 template <typename _Tp>
-  constexpr bool is_nothrow_destructible_v =
+  inline constexpr bool is_nothrow_destructible_v =
     is_nothrow_destructible<_Tp>::value;
 template <typename _Tp>
-  constexpr bool has_virtual_destructor_v =
+  inline constexpr bool has_virtual_destructor_v =
     has_virtual_destructor<_Tp>::value;
 template <typename _Tp>
-  constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
+  inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
 template <typename _Tp>
-  constexpr size_t rank_v = rank<_Tp>::value;
+  inline constexpr size_t rank_v = rank<_Tp>::value;
 template <typename _Tp, unsigned _Idx = 0>
-  constexpr size_t extent_v = extent<_Tp, _Idx>::value;
+  inline constexpr size_t extent_v = extent<_Tp, _Idx>::value;
 template <typename _Tp, typename _Up>
-  constexpr bool is_same_v = is_same<_Tp, _Up>::value;
+  inline constexpr bool is_same_v = is_same<_Tp, _Up>::value;
 template <typename _Base, typename _Derived>
-  constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value;
+  inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value;
 template <typename _From, typename _To>
-  constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
+  inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
 
 #ifdef __has_builtin
 # if !__has_builtin(__has_unique_object_representations)
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 58bf8c7..272b2a6 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -91,7 +91,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : std::integral_constant<size_t, sizeof...(_Types)> {};
 
   template<typename _Variant>
-    constexpr size_t variant_size_v = variant_size<_Variant>::value;
+    inline constexpr size_t variant_size_v = variant_size<_Variant>::value;
 
   template<size_t _Np, typename _Variant>
     struct variant_alternative;
@@ -120,7 +120,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct variant_alternative<_Np, const volatile _Variant>
     { using type = add_cv_t<variant_alternative_t<_Np, _Variant>>; };
 
-  constexpr size_t variant_npos = -1;
+  inline constexpr size_t variant_npos = -1;
 
   template<size_t _Np, typename... _Types>
     constexpr variant_alternative_t<_Np, variant<_Types...>>&
@@ -151,7 +151,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct __index_of : std::integral_constant<size_t, 0> {};
 
   template<typename _Tp, typename... _Types>
-    constexpr size_t __index_of_v = __index_of<_Tp, _Types...>::value;
+    inline constexpr size_t __index_of_v = __index_of<_Tp, _Types...>::value;
 
   template<typename _Tp, typename _First, typename... _Rest>
     struct __index_of<_Tp, _First, _Rest...> :
@@ -510,7 +510,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct __tuple_count;
 
   template<typename _Tp, typename _Tuple>
-    constexpr size_t __tuple_count_v = __tuple_count<_Tp, _Tuple>::value;
+    inline constexpr size_t __tuple_count_v =
+      __tuple_count<_Tp, _Tuple>::value;
 
   template<typename _Tp, typename... _Types>
     struct __tuple_count<_Tp, tuple<_Types...>>
@@ -524,7 +525,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   // TODO: Reuse this in <tuple> ?
   template<typename _Tp, typename... _Types>
-    constexpr bool __exactly_once = __tuple_count_v<_Tp, tuple<_Types...>> == 1;
+    inline constexpr bool __exactly_once =
+      __tuple_count_v<_Tp, tuple<_Types...>> == 1;
 
   // Takes _Types and create an overloaded _S_fun for each type.
   // If a type appears more than once in _Types, create only one overload.
diff --git a/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc b/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
index 3f677b3..66ea3cc 100644
--- a/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
@@ -30,8 +30,10 @@  namespace std {
 
 #if __cplusplus > 201402L
   enum class align_val_t : size_t;
-  // static constexpr size_t hardware_destructive_interference_size;
-  // static constexpr size_t hardware_constructive_interference_size;
+  // _GLIBCXX17_INLINE constexpr size_t
+  //    hardware_destructive_interference_size;
+  // _GLIBCXX17_INLINE constexpr size_t
+  //    hardware_constructive_interference_size;
 #endif
 }
 
diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc
index a97d43e..e200a7a 100644
--- a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc
@@ -41,7 +41,7 @@  test02()
 // { dg-error "required from here" "" { target *-*-* } 28 }
 // { dg-error "expected initializer" "" { target *-*-* } 35 }
 // { dg-error "expected initializer" "" { target *-*-* } 37 }
-// { dg-error "overflow in addition" "" { target *-*-* } 451 }
+// { dg-error "overflow in addition" "" { target *-*-* } 452 }
 // { dg-error "overflow in multiplication" "" { target *-*-* } 97 }
 // { dg-error "overflow in multiplication" "" { target *-*-* } 99 }
 // { dg-error "overflow in multiplication" "" { target *-*-* } 101 }
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
index f709336..9181d61 100644
--- a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
@@ -46,5 +46,5 @@  test01()
   scoped_alloc sa;
   auto p = sa.allocate(1);
   sa.construct(p);  // this is required to be ill-formed
-  // { dg-error "static assertion failed" "" { target *-*-* } 89 }
+  // { dg-error "static assertion failed" "" { target *-*-* } 90 }
 }
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc
index 6b04be8..ae3ca93 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc
@@ -118,6 +118,25 @@  test_tuple_cat()
   constexpr auto cat1 __attribute__((unused)) = std::tuple_cat(t1, t2);
 }
 
+namespace {
+
+template<class T>
+constexpr int zero_from_anything(T)
+{
+  return 0;
+}
+
+}
+
+// ignore, see LWG 2773
+void
+test_ignore()
+{
+  constexpr auto ign1 __attribute__((unused)) = std::ignore;
+  constexpr auto ign2 __attribute__((unused)) = std::make_tuple(std::ignore);
+  constexpr int ign3 __attribute__((unused)) = zero_from_anything(std::ignore);
+}
+
 int
 main()
 {
@@ -126,6 +145,7 @@  main()
   test_tie();
   test_get();
   test_tuple_cat();
+  test_ignore();
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc
new file mode 100644
index 0000000..3369e03
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc
@@ -0,0 +1,36 @@ 
+// { dg-do compile { target c++14 } }
+
+// Copyright (C) 2017 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on pair, and also vector. If the implementation
+// changes this test may begin to fail.
+
+#include <tuple>
+
+// ignore, see LWG 2773 + LWG 2933.
+constexpr bool
+test_ignore()
+{
+  auto res = std::tie(std::ignore);
+  std::get<0>(res) = 42;
+  return true;
+}
+
+static_assert(test_ignore(), "test_ignore failure");
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
index 3040b29..aa118ca 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
@@ -44,5 +44,5 @@  test01()
 {
   alloc_type a;
   std::tuple<X> t(std::allocator_arg, a); // this is required to be ill-formed
-  // { dg-error "static assertion failed" "" { target *-*-* } 89 }
+  // { dg-error "static assertion failed" "" { target *-*-* } 90 }
 }
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
index 2322e4b..f747636 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
@@ -43,4 +43,4 @@  void test01()
 
   tuple<Type> t(allocator_arg, a, 1);
 }
-// { dg-error "static assertion failed" "" { target *-*-* } 89 }
+// { dg-error "static assertion failed" "" { target *-*-* } 90 }