http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46472

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.02.17 20:25:58
            Summary|[C++0X] constexpr is not    |[4.6 Regression] [C++0X]
                   |constexpr                   |constexpr is not constexpr
     Ever Confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-02-17 
20:25:58 UTC ---
Marc provided this testcase demonstrating a regression since 4.5
(probably in G++ but possibly libstdc++, a regression either way)

#include <utility>
#include <array>
struct A {
       A(){}
};
std::array< std::pair<int,A>, 2> x;


In file included from c.cc:2:0:
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/array:
In constructor ‘constexpr std::array<std::pair<int, A>, 2ul>::array()’:
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/array:60:12:
error: ‘constexpr std::pair<_T1, _T2>::pair() [with _T1 = int, _T2 = A]’ is not
‘constexpr’
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/array:60:12:
error: non-constant array initialization
c.cc: At global scope:                                                          
c.cc:6:34: note: synthesized method ‘std::array<std::pair<int, A>,
2ul>::array()’ first required here

Reply via email to