Is the following code valid?

   #include <tuple>

   struct X
   {
     std::tuple<int,int> tt{1, 2};   // works
   };

   struct Y
   {
     std::tuple<int,int> tt = std::tuple<int,int>{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: expected unqualified-id before 'int'

   $ g++-snapshot --version
   g++ (Debian 20111210-1) 4.7.0 20111210 (experimental) [trunk revision 182188]
   Copyright (C) 2011 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks,

-miles

-- 
Alone, adj. In bad company.

Reply via email to