[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#632938: g++-4.6: 4.6.1-2 broke boost::multi_array when compiling with -std=c++0x



Package: g++-4.6
Version: 4.6.1-2
Severity: normal

Hi,

with g++-4.6.1-1, the following program compiled fine with the -std=c++0x
command line switch:

#include <boost/multi_array.hpp>
int main() {
  boost::multi_array<int, 3> x(boost::extents[1][2][3]);
}

Since g++-4.6.1-2, it doesn't compile any longer (it does compile with
-std=c++03).
The error message looks like this:


In file included from /usr/include/boost/multi_array/range_list.hpp:19:0,
                 from /usr/include/boost/multi_array/extent_gen.hpp:17,
                 from /usr/include/boost/multi_array/base.hpp:22,
                 from /usr/include/boost/multi_array.hpp:21,
                 from test.cc:1:
/usr/include/boost/array.hpp: In constructor
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
2u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 2u>&&)’:
/usr/include/boost/array.hpp:58:11:   instantiated from
‘boost::detail::multi_array::extent_gen<(NumRanges + 1)>
boost::detail::multi_array::extent_gen<NumRanges>::operator[](boost::detail::multi_array::extent_gen<NumRanges>::index)
[with unsigned int NumRanges = 1u,
boost::detail::multi_array::extent_gen<NumRanges>::index = int]’
test.cc:4:51:   instantiated from here
/usr/include/boost/array.hpp:58:11: error: temporary of non-literal type
‘boost::detail::multi_array::extent_range<int, unsigned int> [2]’ in a
constant expression
In file included from /usr/include/boost/multi_array/base.hpp:22:0,
                 from /usr/include/boost/multi_array.hpp:21,
                 from test.cc:1:
/usr/include/boost/multi_array/extent_gen.hpp: In constructor ‘constexpr
boost::detail::multi_array::extent_gen<2u>::extent_gen(boost::detail::multi_array::extent_gen<2u>&&)’:
/usr/include/boost/multi_array/extent_gen.hpp:28:7: note: synthesized method
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
2u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 2u>&&)’ first required here
/usr/include/boost/multi_array/extent_gen.hpp:28:7: error:
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
2u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 2u>&&)’ is not ‘constexpr’
/usr/include/boost/multi_array/extent_gen.hpp: In member function
‘boost::detail::multi_array::extent_gen<(NumRanges + 1)>
boost::detail::multi_array::extent_gen<NumRanges>::operator[](boost::detail::multi_array::extent_gen<NumRanges>::index)
[with unsigned int NumRanges = 1u,
boost::detail::multi_array::extent_gen<NumRanges>::index = int]’:
/usr/include/boost/multi_array/extent_gen.hpp:62:54: note: synthesized method
‘boost::detail::multi_array::extent_gen<2u>::extent_gen(boost::detail::multi_array::extent_gen<2u>&&)’
first required here
In file included from /usr/include/boost/multi_array/range_list.hpp:19:0,
                 from /usr/include/boost/multi_array/extent_gen.hpp:17,
                 from /usr/include/boost/multi_array/base.hpp:22,
                 from /usr/include/boost/multi_array.hpp:21,
                 from test.cc:1:
/usr/include/boost/array.hpp: In constructor
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
3u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 3u>&&)’:
/usr/include/boost/array.hpp:58:11:   instantiated from
‘boost::detail::multi_array::extent_gen<(NumRanges + 1)>
boost::detail::multi_array::extent_gen<NumRanges>::operator[](boost::detail::multi_array::extent_gen<NumRanges>::index)
[with unsigned int NumRanges = 2u,
boost::detail::multi_array::extent_gen<NumRanges>::index = int]’
test.cc:4:54:   instantiated from here
/usr/include/boost/array.hpp:58:11: error: temporary of non-literal type
‘boost::detail::multi_array::extent_range<int, unsigned int> [3]’ in a
constant expression
In file included from /usr/include/boost/multi_array/base.hpp:22:0,
                 from /usr/include/boost/multi_array.hpp:21,
                 from test.cc:1:
/usr/include/boost/multi_array/extent_gen.hpp: In constructor ‘constexpr
boost::detail::multi_array::extent_gen<3u>::extent_gen(boost::detail::multi_array::extent_gen<3u>&&)’:
/usr/include/boost/multi_array/extent_gen.hpp:28:7: note: synthesized method
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
3u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 3u>&&)’ first required here
/usr/include/boost/multi_array/extent_gen.hpp:28:7: error:
‘boost::array<boost::detail::multi_array::extent_range<int, unsigned int>,
3u>::array(boost::array<boost::detail::multi_array::extent_range<int, unsigned
int>, 3u>&&)’ is not ‘constexpr’
/usr/include/boost/multi_array/extent_gen.hpp: In member function
‘boost::detail::multi_array::extent_gen<(NumRanges + 1)>
boost::detail::multi_array::extent_gen<NumRanges>::operator[](boost::detail::multi_array::extent_gen<NumRanges>::index)
[with unsigned int NumRanges = 2u,
boost::detail::multi_array::extent_gen<NumRanges>::index = int]’:
/usr/include/boost/multi_array/extent_gen.hpp:62:54: note: synthesized method
‘boost::detail::multi_array::extent_gen<3u>::extent_gen(boost::detail::multi_array::extent_gen<3u>&&)’
first required here



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.39-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to //bin/bash

Versions of packages g++-4.6 depends on:
ii  gcc-4.6                 4.6.1-2          GNU C compiler
ii  gcc-4.6-base            4.6.1-2          GCC, the GNU Compiler Collection (
ii  libc6                   2.13-10          Embedded GNU C Library: Shared lib
ii  libcloog-ppl0           0.15.9-3         the Chunky Loop Generator (runtime
ii  libgmp10                2:5.0.1+dfsg-7   Multiprecision arithmetic library
ii  libgmpxx4ldbl           2:5.0.1+dfsg-7   Multiprecision arithmetic library 
ii  libmpc2                 0.9-3            multiple precision complex floatin
ii  libmpfr4                3.0.1-4          multiple precision floating-point 
ii  libppl-c4               0.11.2-3         Parma Polyhedra Library (C interfa
ii  libppl9                 0.11.2-3         Parma Polyhedra Library (runtime l
ii  libstdc++6-4.6-dev      4.6.1-2          GNU Standard C++ Library v3 (devel
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

g++-4.6 recommends no packages.

Versions of packages g++-4.6 suggests:
pn  g++-4.6-multilib              <none>     (no description available)
pn  gcc-4.6-doc                   <none>     (no description available)
pn  libstdc++6-4.6-dbg            <none>     (no description available)

-- no debconf information



Reply to: