Subject: [Boost-bugs] [Boost C++ Libraries] #12436: Fusion fails if a member type starts with "::"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-05 03:45:07
#12436: Fusion fails if a member type starts with "::"
------------------------------+---------------------
Reporter: jaredgrubb | Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: fusion
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
The following code compiles fine in boost-1.57 but fails in boost-1.59 and
later.
Example:
{{{
#include <string>
#include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/include/define_struct.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
BOOST_FUSION_DEFINE_STRUCT(
(demo), employee,
(::std::size_t, age))
}}}
The error shown by clang:
{{{
fusion.cpp:6:1: error: pasting formed 'BOOST_PP_IS_EMPTY_DEF_::', an
invalid preprocessing token
BOOST_FUSION_DEFINE_STRUCT(
^
/Users/grubber/src/work/boost-1.59.0/boost/fusion/adapted/struct/define_struct.hpp:38:5:
note: expanded from macro 'BOOST_FUSION_DEFINE_STRUCT'
BOOST_FUSION_ADAPT_STRUCT(
\
^
/Users/grubber/src/work/boost-1.59.0/boost/fusion/adapted/struct/adapt_struct.hpp:110:17:
note: expanded from macro 'BOOST_FUSION_ADAPT_STRUCT'
BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,
\
^
/Users/grubber/src/work/boost-1.59.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp:25:5:
note: expanded from macro 'BOOST_FUSION_ADAPT_STRUCT_FILLER_0'
BOOST_FUSION_ADAPT_STRUCT_FILLER_1
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0
to see all)
/Users/grubber/src/work/boost-1.59.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp:35:17:
note: expanded from macro 'BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR'
BOOST_PP_IF(BOOST_PP_IS_EMPTY(X),
\
^
/Users/grubber/src/work/boost-1.59.0/boost/preprocessor/facilities/is_empty.hpp:35:34:
note: expanded from macro 'BOOST_PP_IS_EMPTY'
# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x
BOOST_PP_IS_EMPTY_HELPER)
^
/Users/grubber/src/work/boost-1.59.0/boost/preprocessor/facilities/is_empty.hpp:36:93:
note: expanded from macro 'BOOST_PP_IS_EMPTY_I'
# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1,
(BOOST_PP_IS_EMPTY_DEF_ ## contents()))
^
1 error generated.
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12436> 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:20 UTC