Bug 65978

Summary: missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and 2301)
Product: gcc Reporter: rhalbersma <rhalbersma>
Component: libstdc++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: webrown.cpp
Priority: P3    
Version: 5.1.0   
Target Milestone: 6.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2015-05-02 00:00:00

Description rhalbersma 2015-05-02 08:08:22 UTC
Neither libstdc++ 5.1.0 nor the trunk version implement LWG defect reports 2275 and 2301 that make std::tuple utilities std::forward_as_tuple and std::tie constexpr 

http://wg21.cmeerw.net/lwg/issue2275
http://wg21.cmeerw.net/lwg/issue2301

Both of these have been implemented in libc++ for a while now:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131007/090369.html
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140224/099936.html

Since both resolutions only require C++11 style constexpr support, they could also be backported to earlier versions in -std=c++1y mode.
Comment 1 Jonathan Wakely 2015-05-02 11:20:35 UTC
Author: redi
Date: Sat May  2 11:20:03 2015
New Revision: 222719

URL: https://gcc.gnu.org/viewcvs?rev=222719&root=gcc&view=rev
Log:
	PR libstdc++/65978
	* include/std/tuple (forward_as_tuple, tie): Add constexpr.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Uncomment
	and fix tests for forward_as_tuple and tie.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/tuple
    trunk/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc
Comment 2 Jonathan Wakely 2015-05-02 11:20:56 UTC
Fixed on trunk so far.
Comment 3 rhalbersma 2015-12-19 08:41:48 UTC
Ping to get this merged into the upcoming 5.4.
Comment 4 Jonathan Wakely 2017-05-17 18:04:44 UTC
This was fixed for GCC 6, but I'm not going to backport it.