Hello fellow Boost users,
Consider the following program:
#include <sstream>
#include <string>
#include <vector>
#include
#include
#include
#include
template <typename T>
std::string archive(T thing)
{
std::ostringstream oss;
boost::archive::text_oarchive oa(oss);
oa << thing;
return oss.str();
}
typedef std::vector< std::string > parameters_t;
int main()
{
parameters_t parameters;
parameters.push_back("a");
parameters.push_back("b");
std::string s = archive(parameters);
return 0;
}
When I compile this with Boost 1.32 it compiles and works fine.
However, with Boost.1.33 it fails with:
/usr/local/include/boost/archive/detail/oserializer.hpp: In function
`void
boost::archive::save(Archive&, T&) [with Archive =
boost::archive::text_oarchive, T = std::vectorstd::string >]':
/usr/local/include/boost/archive/basic_text_oarchive.hpp:78:
instantiated from `void
boost::archive::basic_text_oarchive<Archive>::save_override(T&, int)
[with T = std::vectorstd::string >,
Archive = boost::archive::text_oarchive]'
/usr/local/include/boost/archive/detail/interface_oarchive.hpp:85:
instantiated from `Archive&
boost::archive::detail::interface_oarchive<Archive>::operator<<(T&)
[with T = parameters_t, Archive = boost::archive::text_oarchive]'
test.cpp:16: instantiated from `std::string archive(T) [with T =
parameters_t]'
test.cpp:28: instantiated from here
/usr/local/include/boost/archive/detail/oserializer.hpp:566: error:
incomplete
type `boost::STATIC_ASSERTION_FAILURE<false>' does not have
member `value'
I'm not sure what to change. Is this correct behaviour?
S.