diff --git a/include/boost/wave/cpp_context.hpp b/include/boost/wave/cpp_context.hpp index 7ed652e..d7b5bf1 100644 --- a/include/boost/wave/cpp_context.hpp +++ b/include/boost/wave/cpp_context.hpp @@ -343,9 +343,12 @@ private: { typedef typename token_type::string_type string_type; - ar & string_type(BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG)); - ar & string_type(BOOST_WAVE_PRAGMA_KEYWORD); - ar & string_type(BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE))); + string_type cfg(BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG)); + string_type kwd(BOOST_WAVE_PRAGMA_KEYWORD); + string_type strtype(BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE))); + ar & cfg; + ar & kwd; + ar & strtype; ar & language; ar & macros; diff --git a/include/boost/wave/util/cpp_include_paths.hpp b/include/boost/wave/util/cpp_include_paths.hpp index 4f9ffbb..023c465 100644 --- a/include/boost/wave/util/cpp_include_paths.hpp +++ b/include/boost/wave/util/cpp_include_paths.hpp @@ -424,7 +424,8 @@ template inline void save (Archive & ar, boost::filesystem::path const& p, const unsigned int /* file_version */) { - ar & p.native_file_string(); + std::string path_str(p.native_file_string()); + ar & path_str; } template diff --git a/include/boost/wave/util/flex_string.hpp b/include/boost/wave/util/flex_string.hpp index 9a65163..d577a7b 100644 --- a/include/boost/wave/util/flex_string.hpp +++ b/include/boost/wave/util/flex_string.hpp @@ -80,6 +80,7 @@ class StoragePolicy #include #if BOOST_WAVE_SERIALIZATION != 0 #include +#include #include #include #define BOOST_WAVE_FLEX_STRING_SERIALIZATION_HACK 1 diff --git a/tool/cpp.cpp b/tool/cpp.cpp index b6d1d73..44ffc31 100644 --- a/tool/cpp.cpp +++ b/tool/cpp.cpp @@ -77,6 +77,7 @@ using std::pair; using std::vector; using std::getline; using std::ifstream; +using std::ofstream; using std::cout; using std::cerr; using std::endl; @@ -422,11 +423,10 @@ namespace { if (state_file == "-") state_file = fs::path("wave.state", fs::native); - using std::ios_base::openmode; - openmode mode = ios_base::in; + std::ios::openmode mode = std::ios::in; #if BOOST_WAVE_BINARY_SERIALIZATION != 0 - mode = (openmode)(mode | ios_base::binary); + mode = (std::ios::openmode)(mode | std::ios::binary); #endif ifstream ifs (state_file.string().c_str(), mode); if (ifs.is_open()) { @@ -466,11 +466,10 @@ namespace { if (state_file == "-") state_file = fs::path("wave.state", fs::native); - using std::ios_base::openmode; - openmode mode = ios_base::out; + std::ios::openmode mode = std::ios::out; #if BOOST_WAVE_BINARY_SERIALIZATION != 0 - mode = (openmode)(mode | ios_base::binary); + mode = (std::ios::openmode)(mode | std::ios::binary); #endif ofstream ofs(state_file.string().c_str(), mode); if (!ofs.is_open()) { @@ -480,7 +479,8 @@ namespace { } else { oarchive oa(ofs); - oa << string(CPP_VERSION_FULL_STR); // write version + string version(CPP_VERSION_FULL_STR); + oa << version; // write version oa << ctx; // write the internal tables to disc } } @@ -848,7 +848,7 @@ auto_stop_watch elapsed_time(cerr); // print out the current token value if (allow_output) { - if (output.rdstate() & (ios::badbit | ios::failbit | ios::eofbit)) + if (output.rdstate() & (std::ios::badbit | std::ios::failbit | std::ios::eofbit)) { cerr << "wave: problem writing to the current " << "output file" << endl; diff --git a/tool/trace_macro_expansion.hpp b/tool/trace_macro_expansion.hpp index 216bfa0..2290f39 100644 --- a/tool/trace_macro_expansion.hpp +++ b/tool/trace_macro_expansion.hpp @@ -600,6 +600,7 @@ protected: IteratorT end, typename ContextT::token_type const &act_token) { using namespace boost::wave; + namespace fs = boost::filesystem; typedef typename ContextT::token_type token_type; typedef typename token_type::string_type string_type;