[Boost-bugs] [Boost C++ Libraries] #4351: boost 1_43_0 BOOST_MPL_ASSERT compile error (gcc 4.2)

Subject: [Boost-bugs] [Boost C++ Libraries] #4351: boost 1_43_0 BOOST_MPL_ASSERT compile error (gcc 4.2)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-16 16:09:42


#4351: boost 1_43_0 BOOST_MPL_ASSERT compile error (gcc 4.2)
------------------------------------------------+---------------------------
 Reporter: Jeff Epler <jepler@…> | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: mpl
  Version: Boost 1.43.0 | Severity: Problem
 Keywords: |
------------------------------------------------+---------------------------
 The simple version:
 {{{
 #include <boost/mpl/assert.hpp>
 int main() { BOOST_MPL_ASSERT((1)); BOOST_MPL_ASSERT((1)); return 0;}
 }}}
 (it is important that both BOOST_MPL_ASSERT invocations are '''on the same
 line''')

 On gcc 4.2.4 (Ubuntu 8.04), this leads to the following error:
 {{{
 $ g++ -I /src/jepler/boost_1_43_0/ main.c
 main.c: In function ‘int main()’:
 main.c:2: error: conflicting declaration ‘mpl_assertion_in_line_2’
 main.c:2: error: ‘mpl_assertion_in_line_2’ has a previous declaration
  as ‘main()::<anonymous enum> mpl_assertion_in_line_2’
 }}}

 I am trying to migrate an application from boost 1_34_0 to boost 1_43_0.
 Among other boost features, it uses boost serialization. It has
 BOOST_CLASS_VERSION declarations across various header files. When two
 header files are included in the same source file, and they both contain
 BOOST_CLASS_VERSION declarations '''on the same source line''' (e.g.,
 fooclass.h line 30 and barclass.h line 30) a similar error results.

 The attached tar file demonstrates the original problem with
 BOOST_CLASS_VERSION that first came to my attention.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4351>
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:03 UTC