Boost logo

Boost :

From: Richard Guenther (rguenther_at_[hidden])
Date: 2006-05-11 10:56:13


This is the set of fixes that have accumulated for CVS version of
wave/cpp.cpp. It still fails to build for me with gcc 4.1.0 with

gcc-C++-action ../../../bin/boost/tools/wave/build/wave/gcc/release/cpp.o
../cpp.cpp: In function 'void<unnamed>::save_state(const
boost::program_options::variables_map&, const Context&) [with Context =
context_type]':
../cpp.cpp:882: instantiated from here
../cpp.cpp:483: error: no match for 'operator<<' in 'oa <<
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>(((const char*)"0x010204"), ((const std::allocator<char>&)((const
std::allocator<char>*)(& std::allocator<char>()))))'
/abuild/rguenther/boost/boost/boost/archive/detail/interface_oarchive.hpp:78:
note: candidates are: Archive&
boost::archive::detail::interface_oarchive<Archive>::operator<<(T&) [with
T = std::string, Archive = boost::archive::binary_oarchive]

Thanks,
Richard.

Index: tools/wave/cpp.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/wave/cpp.cpp,v
retrieving revision 1.25
diff -u -r1.25 cpp.cpp
--- tools/wave/cpp.cpp 21 Mar 2006 15:31:42 -0000 1.25
+++ tools/wave/cpp.cpp 11 May 2006 14:54:08 -0000
@@ -146,7 +146,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 // forward declarations only
-namespace cmd_line_utils
+namespace cmd_line_util
 {
     class include_paths;
 }
@@ -154,7 +154,7 @@
 namespace boost { namespace program_options {
 
     void validate(boost::any &v, std::vector<std::string> const &s,
- cmd_line_utils::include_paths *, int);
+ cmd_line_util::include_paths *, long);
 
 }} // boost::program_options
 
@@ -273,7 +273,7 @@
 namespace boost { namespace program_options {
 
     void validate(boost::any &v, std::vector<std::string> const &s,
- cmd_line_util::include_paths *, int)
+ cmd_line_util::include_paths *, long)
     {
         cmd_line_util::include_paths::validate(v, s);
     }
@@ -422,11 +422,11 @@
                 if (state_file == "-")
                     state_file = fs::path("wave.state", fs::native);
 
- using std::ios_base::openmode;
- openmode mode = ios_base::in;
+ typedef std::ios_base::openmode openmode;
+ openmode mode = std::ios_base::in;
 
 #if BOOST_WAVE_BINARY_SERIALIZATION != 0
- mode = (openmode)(mode | ios_base::binary);
+ mode = (openmode)(mode | std::ios_base::binary);
 #endif
                 ifstream ifs (state_file.string().c_str(), mode);
                 if (ifs.is_open()) {
@@ -466,13 +466,13 @@
                 if (state_file == "-")
                     state_file = fs::path("wave.state", fs::native);
 
- using std::ios_base::openmode;
- openmode mode = ios_base::out;
+ typedef std::ios_base::openmode openmode;
+ openmode mode = std::ios_base::out;
 
 #if BOOST_WAVE_BINARY_SERIALIZATION != 0
- mode = (openmode)(mode | ios_base::binary);
+ mode = (openmode)(mode | std::ios_base::binary);
 #endif
- ofstream ofs(state_file.string().c_str(), mode);
+ std::ofstream ofs(state_file.string().c_str(), mode);
                 if (!ofs.is_open()) {
                     cerr << "wave: could not open state file for writing: "
                          << state_file.string() << endl;
@@ -848,7 +848,7 @@
 
                     // 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;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk