Is the following code valid?
#include
struct X
{
std::tuple tt{1, 2}; // works
};
struct Y
{
std::tuple tt = std::tuple{1, 2}; // *error*
};
'cause it results in an error with gcc 20111210:
$ g++-snapshot -c -std=c++11 nsdmi2.cc
nsdmi2.cc:10:43: error:
On 23 December 2011 09:06, Miles Bader wrote:
> Is the following code valid?
>
> #include
>
> struct X
> {
> std::tuple tt{1, 2}; // works
> };
>
> struct Y
> {
> std::tuple tt = std::tuple{1, 2}; // *error*
> };
>
> 'cause it results in an error with gcc 20111210:
>
>
k, bugzilla'd
thanks,
-miles
--
Cat is power. Cat is peace.
Snapshot gcc-4.6-20111223 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/4.6-20111223/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 4.6 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches
gcc seems to have had a succession of warnings about non-virtual-
destructors-in-classes-with-virtual-methods, none of which really
worked all that well in practice (and so none are enabled by default,
even by -Wall or -Wextra).
But I notice clang has a variant which seems pretty well-behaved on
r