Bug 65978 - missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and 2301)
Summary: missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 5.1.0
: P3 normal
Target Milestone: 6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-02 08:08 UTC by rhalbersma
Modified: 2017-05-17 18:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-05-02 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.