This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51829] decltype() deduces non-const but only in a template
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 May 2012 09:06:42 +0000
- Subject: [Bug c++/51829] decltype() deduces non-const but only in a template
- Auto-submitted: auto-generated
- References: <bug-51829-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51829
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2012-05-13 09:06:42 UTC ---
With boost 1.49, g++-4.7 compiles the code just fine, while g++-4.6 gives:
u.cc: In function âvoid bug() [with <template-parameter-1-1> = void]â:
u.cc:14:24: instantiated from here
u.cc:11:3: error: cannot convert âconst type {aka const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::address_of,
boost::proto::argsns_::list1<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::bitwise_or,
boost::proto::argsns_::list2<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::eps,
boost::fusion::vector1<bool> > >, 0l>&,
boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char&>, 0l> >, 2l>&>, 1l>}â to âconst type*
{aka const boost::proto::exprns_::expr<boost::proto::tagns_::tag::bitwise_or,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::eps,
boost::fusion::vector1<bool> > >, 0l>&,
boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char&>, 0l> >, 2l>*}â in assignment