2301. Why is std::tie not constexpr?

Section: 23.5.3.4 [tuple.creation] Status: C++14 Submitter: Rein Halbersma Opened: 2013-09-11 Last modified: 2016-02-10

Priority: 2

View other active issues in [tuple.creation].

View all other issues in [tuple.creation].

View all issues with C++14 status.

Discussion:

In N3471, a bunch of routines from header <tuple> were made constexpr.

make_tuple/tuple_cat/get<>(tuple)/relational operators — all these were "constexpr-ified".

But not tie. This is similar to Issue 2275, where the same observation was made about forward_as_tuple.

[2014-02-13 Issaquah: Move as Immediate]

Proposed resolution:

This wording is relative to N3691.

  1. Change the header <tuple> synopsis, 23.5.1 [tuple.general] p2 as indicated:

    template<class... Types>
      constexpr tuple<Types&...> tie(Types&...) noexcept;
    
  2. Change 23.5.3.4 [tuple.creation] around p7 as indicated:

    template<class... Types>
      constexpr tuple<Types&...> tie(Types&... t) noexcept;