diff --git a/include/tuple b/include/tuple index 24e086db..30a958ab 100644 --- a/include/tuple +++ b/include/tuple @@ -74,7 +74,7 @@ const unspecified ignore; template tuple make_tuple(T&&...); // constexpr in C++14 template tuple forward_as_tuple(T&&...) noexcept; // constexpr in C++14 -template tuple tie(T&...) noexcept; +template tuple tie(T&...) noexcept; // constexpr in C++14 template tuple tuple_cat(Tuples&&... tpls); // constexpr in C++14 // 20.4.1.4, tuple helper classes: @@ -796,7 +796,7 @@ constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept // tie template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 tuple<_Tp&...> tie(_Tp&... __t) _NOEXCEPT { diff --git a/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp b/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp index 112ee39a..e6ebf958 100644 --- a/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp +++ b/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp @@ -27,4 +27,13 @@ int main() assert(i == 42); assert(s == "C++"); } +#if _LIBCPP_STD_VER > 11 + { + static constexpr int i = 42; + static constexpr double f = 1.1; + constexpr std::tuple t = std::tie(i, f); + static_assert ( std::get<0>(t) == 42, "" ); + static_assert ( std::get<1>(t) == 1.1, "" ); + } +#endif } diff --git a/www/cxx1y_status.html b/www/cxx1y_status.html index bb99d19f..2ac2ad2a 100644 --- a/www/cxx1y_status.html +++ b/www/cxx1y_status.html @@ -240,7 +240,7 @@ 2258a.erase(q1, q2) unable to directly return q2IssaquahComplete 2263Comparing iterators and allocator pointers with different const-characterIssaquah 2293Wrong facet used by num_put::do_putIssaquahComplete - 2301Why is std::tie not constexpr?Issaquah + 2301Why is std::tie not constexpr?IssaquahComplete 2304Complexity of count in unordered associative containersIssaquahComplete 2306match_results::reference should be value_type&, not const value_type&Issaquah 2308Clarify container destructor requirements w.r.t. std::arrayIssaquahComplete