Re: [Boost-bugs] [Boost C++ Libraries] #8381: karma::uint_generator fails to compile in C++11 mode

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8381: karma::uint_generator fails to compile in C++11 mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-03 20:28:41


#8381: karma::uint_generator fails to compile in C++11 mode
--------------------------------------+-------------------------------------
  Reporter: andysem | Owner: hkaiser
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: spirit
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by andysem):

 An additional observation. The code compiles on c++0x mode if native
 static_assert use is disabled in assert_msg.hpp. It looks like gcc
 performs the assertion failure when compiling any_uint_generator::generate
 because the compile time predicate is a constant false and does not depend
 on template parameters. For example, if I replace the line

 {{{
 BOOST_SPIRIT_ASSERT_MSG(false, uint_not_usable_without_attribute, ());
 }}}

 with

 {{{
 BOOST_SPIRIT_ASSERT_MSG((!is_same< OutputIterator, OutputIterator
>::value), uint_not_usable_without_attribute, ());
 }}}

 the code compiles. I think this is a compiler bug, but a workaround is
 desired. Perhaps this any_uint_generator::generate overload should not be
 present in the first place?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8381#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC