public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type
@ 2013-10-29 11:57 Gaetano.Checinski at googlemail dot com
2013-10-29 13:25 ` [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args paolo.carlini at oracle dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gaetano.Checinski at googlemail dot com @ 2013-10-29 11:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58910
Bug ID: 58910
Summary: std::Tuple_impl is non constexpr when using identical
userdefined structs as type
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Gaetano.Checinski at googlemail dot com
Following code does not compile with gcc-snapshot(2013-10-21) :
#include <tuple>
using namespace std;
struct t1{ constexpr t1(){} };
struct t2{ constexpr t2(){} };
int main()
{
constexpr t1 T1;
constexpr t2 T2;
constexpr tuple<t1,t2> Tup1(T1,T2);
constexpr tuple<t1,t1> Tup2(T1,T1);
constexpr auto a=get<0>(Tup1 ); //works fine
constexpr auto b=get<0>(Tup2 ); // error:
//'(const std::_Head_base<0ul, t1, true>*)(& Tup2)'
//is not a constant expression constexpr auto b=get<0>(Tup2 );
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args
2013-10-29 11:57 [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type Gaetano.Checinski at googlemail dot com
@ 2013-10-29 13:25 ` paolo.carlini at oracle dot com
2013-10-29 14:26 ` [Bug c++/58910] " paolo.carlini at oracle dot com
2015-02-18 17:43 ` ville.voutilainen at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-29 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58910
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-10-29
CC| |jwakely.gcc at gmail dot com
Summary|std::Tuple_impl is non |[4.9 Regression]
|constexpr when using |std::Tuple_impl is non
|identical userdefined |constexpr when using
|structs as template-args |identical userdefined
| |structs as template-args
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is a regression and I don't think we changed anything in the library?!?
Looks like a C++ regression then, and we would need a reduced testcase.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58910] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args
2013-10-29 11:57 [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type Gaetano.Checinski at googlemail dot com
2013-10-29 13:25 ` [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args paolo.carlini at oracle dot com
@ 2013-10-29 14:26 ` paolo.carlini at oracle dot com
2015-02-18 17:43 ` ville.voutilainen at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-29 14:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58910
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.9 Regression] |std::Tuple_impl is non
|std::Tuple_impl is non |constexpr when using
|constexpr when using |identical userdefined
|identical userdefined |structs as template-args
|structs as template-args |
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Sorry, in fact this isn't a regression. Still the issue seems serious in terms
of impact on <tuple> use. I also note that with the same <tuple>
implementation, clang++ accepts the testcases, thus seems definitely a
front-end issue.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58910] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args
2013-10-29 11:57 [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type Gaetano.Checinski at googlemail dot com
2013-10-29 13:25 ` [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args paolo.carlini at oracle dot com
2013-10-29 14:26 ` [Bug c++/58910] " paolo.carlini at oracle dot com
@ 2015-02-18 17:43 ` ville.voutilainen at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: ville.voutilainen at gmail dot com @ 2015-02-18 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58910
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ville.voutilainen at gmail dot com
--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
I can't reproduce this bug with the current trunk.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-18 17:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 11:57 [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type Gaetano.Checinski at googlemail dot com
2013-10-29 13:25 ` [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args paolo.carlini at oracle dot com
2013-10-29 14:26 ` [Bug c++/58910] " paolo.carlini at oracle dot com
2015-02-18 17:43 ` ville.voutilainen at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).