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

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).