There have been some changes in recent compiler/boost versions that cause build failures with YAS_SERIALIZE_BOOST_TYPES
set.
Here's a full build trace, when trying to compile the included base tests, as follows:
$.../yas/tests/base> g++ -std=c++1y -DYAS_SERIALIZE_BOOST_TYPES -I ../../include main.cpp
In file included from ../../include/yas/detail/preprocessor/enum_params.hpp:19:0,
from ../../include/yas/detail/preprocessor/preprocessor.hpp:48,
from ../../include/yas/detail/io/information.hpp:50,
from ../../include/yas/binary_oarchive.hpp:42,
from main.cpp:40:
../../include/yas/detail/preprocessor/repeat.hpp:43:58: error: expected constructor, destructor, or type conversion before ‘(’ token
# define YAS_PP_REPEAT_1_I(c, m, d) YAS_PP_REPEAT_1_ ## c(m, d)
^
../../include/yas/detail/preprocessor/repeat.hpp:38:35: note: in expansion of macro ‘YAS_PP_REPEAT_1_I’
# define YAS_PP_REPEAT_1(c, m, d) YAS_PP_REPEAT_1_I(c, m, d)
^
../../include/yas/detail/preprocessor/cat.hpp:29:32: note: in expansion of macro ‘YAS_PP_REPEAT_1’
# define YAS_PP_CAT_I(a, b) a ## b
^
../../include/yas/detail/preprocessor/cat.hpp:22:30: note: in expansion of macro ‘YAS_PP_CAT_I’
# define YAS_PP_CAT(a, b) YAS_PP_CAT_I(a, b)
^
../../include/yas/detail/preprocessor/repeat.hpp:29:24: note: in expansion of macro ‘YAS_PP_CAT’
# define YAS_PP_REPEAT YAS_PP_CAT(YAS_PP_REPEAT_, YAS_PP_AUTO_REC(YAS_PP_REPEAT_P, 4))
^
../../include/yas/serializers/binary/boost/boost_fusion_vector_serializers.hpp:122:2: note: in expansion of macro ‘YAS_PP_REPEAT’
YAS_PP_REPEAT( \
^
../../include/yas/serializers/binary/boost/boost_fusion_vector_serializers.hpp:130:1: note: in expansion of macro ‘YAS__BINARY__GENERATE_SERIALIZE_BOOST_FUSION_VECTOR_FUNCTIONS’
YAS__BINARY__GENERATE_SERIALIZE_BOOST_FUSION_VECTOR_FUNCTIONS(FUSION_MAX_VECTOR_SIZE)
^
main.cpp:450:1: error: expected ‘}’ at end of input
}
^
main.cpp:450:1: error: expected ‘}’ at end of input
In file included from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40:0,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
../../include/yas/detail/tools/utf8conv.hpp: In instantiation of ‘void yas::detail::to_utf8(D&, const S&) [with D = boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >; S = boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >]’:
../../include/yas/detail/tools/utf8conv.hpp:100:19: required from here
../../include/yas/detail/tools/utf8conv.hpp:21:28: error: invalid use of incomplete type ‘const class boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >’
for ( auto it = src.begin(); it != src.end(); ++it ) {
^
In file included from ../../include/yas/detail/tools/utf8conv.hpp:11:0,
from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
/usr/include/boost/container/container_fwd.hpp:189:7: note: declaration of ‘class boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >’
class basic_string;
^
In file included from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40:0,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
../../include/yas/detail/tools/utf8conv.hpp:21:34: error: invalid use of incomplete type ‘const class boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >’
for ( auto it = src.begin(); it != src.end(); ++it ) {
^
In file included from ../../include/yas/detail/tools/utf8conv.hpp:11:0,
from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
/usr/include/boost/container/container_fwd.hpp:189:7: note: declaration of ‘class boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >’
class basic_string;
^
In file included from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40:0,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
../../include/yas/detail/tools/utf8conv.hpp:24:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘std::__cxx11::basic_string<char>::value_type {aka char}’)
dst += (std::string::value_type)nchar;
^
../../include/yas/detail/tools/utf8conv.hpp:26:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0xC0 | (nchar >> 6));
^
../../include/yas/detail/tools/utf8conv.hpp:27:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | (nchar & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp:31:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0xE0 | (nchar >> 12));
^
../../include/yas/detail/tools/utf8conv.hpp:32:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | ((nchar >> 6) & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp:33:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | (nchar & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp:35:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0xF0 | (nchar >> 18));
^
../../include/yas/detail/tools/utf8conv.hpp:36:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | ((nchar >> 12) & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp:37:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | ((nchar >> 6) & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp:38:8: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’ and ‘int’)
dst += (0x80 | (nchar & 0x3F));
^
../../include/yas/detail/tools/utf8conv.hpp: In instantiation of ‘void yas::detail::from_utf8(D&, const S&) [with D = boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >; S = boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >]’:
../../include/yas/detail/tools/utf8conv.hpp:107:21: required from here
../../include/yas/detail/tools/utf8conv.hpp:47:28: error: invalid use of incomplete type ‘const class boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’
for ( auto it = src.begin(); it != src.end(); ++it ) {
^
In file included from ../../include/yas/detail/tools/utf8conv.hpp:11:0,
from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
/usr/include/boost/container/container_fwd.hpp:189:7: note: declaration of ‘class boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’
class basic_string;
^
In file included from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40:0,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
../../include/yas/detail/tools/utf8conv.hpp:47:34: error: invalid use of incomplete type ‘const class boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’
for ( auto it = src.begin(); it != src.end(); ++it ) {
^
In file included from ../../include/yas/detail/tools/utf8conv.hpp:11:0,
from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
/usr/include/boost/container/container_fwd.hpp:189:7: note: declaration of ‘class boost::container::basic_string<char, std::char_traits<char>, boost::container::new_allocator<char> >’
class basic_string;
^
In file included from ../../include/yas/serializers/binary/std/std_wstring_serializers.hpp:40:0,
from ../../include/yas/serializers/std_types_serializers.hpp:65,
from main.cpp:52:
../../include/yas/detail/tools/utf8conv.hpp:70:7: error: no match for ‘operator+=’ (operand types are ‘boost::container::basic_string<wchar_t, std::char_traits<wchar_t>, boost::container::new_allocator<wchar_t> >’ and ‘std::__cxx11::basic_string<wchar_t>::value_type {aka wchar_t}’)
dst += tmp;
^