Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-02-16 18:00:43


1. path.hpp
===========

1.1. The BCC workaround is quite clean. If it doesn't make any sense to (statically) override the operator=(string_type) or the string() member functions of basic_path<...> it would be safe to use it as the default implementation, I figure.

1.2. If VC7.0 can handle this kind of deduction it would be worth a try to see if bypassing can be avoided (I don't have this compiler installed).

1.3. There was workaround bypassing the operators for BCC 5.8.1, I don't think it's a good idea because it's likely my workaround (tested with 5.6.4, without bypassing) works for the newer version, too. Someone should adjust TESTED_AT, after it's done.

2. convenience.hpp
==================

The workaround was originally posted by Alisdair Meredith but seems it hasn't been applied, yet (so I added it for completeness and kept TESTED_AT with the version number of the new compiler -- I couldn't double-check because I don't have this version).

3. fstream.hpp
==============

The tweak makes things compile with some versions of the GCC parser, that mistake the open bracket of the explicit function template argument list for an operator (which seems to be the case with that gcc-3.2.3-linux regression).

OK to commit?

Regards,

Tobias

Index: boost/filesystem/convenience.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/filesystem/convenience.hpp,v
retrieving revision 1.10
diff -u -r1.10 convenience.hpp
--- boost/filesystem/convenience.hpp 3 Feb 2006 20:58:33 -0000 1.10
+++ boost/filesystem/convenience.hpp 16 Feb 2006 22:46:12 -0000
@@ -262,6 +262,11 @@
 
     namespace detail
     {
+
+# if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x581))
+ using boost::filesystem::system_message;
+# endif
+
       inline void decode_system_message( system_error_type ec, std::string & target )
       {
         system_message( ec, target );
Index: boost/filesystem/fstream.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/filesystem/fstream.hpp,v
retrieving revision 1.10
diff -u -r1.10 fstream.hpp
--- boost/filesystem/fstream.hpp 3 Feb 2006 20:58:33 -0000 1.10
+++ boost/filesystem/fstream.hpp 16 Feb 2006 15:10:25 -0000
@@ -263,7 +263,7 @@
     basic_filebuf<charT, traits>::open( const wpath & file_ph,
       std::ios_base::openmode mode )
     {
- return open<wpath>( file_ph, mode );
+ return this->BOOST_NESTED_TEMPLATE open<wpath>( file_ph, mode );
     }
 
 // basic_ifstream definitions ----------------------------------------------//
Index: boost/filesystem/path.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/filesystem/path.hpp,v
retrieving revision 1.19
diff -u -r1.19 path.hpp
--- boost/filesystem/path.hpp 8 Feb 2006 16:02:45 -0000 1.19
+++ boost/filesystem/path.hpp 16 Feb 2006 22:44:02 -0000
@@ -591,7 +591,7 @@
     // inserters and extractors --------------------------------------------//
 
 // bypass VC++ 7.0 and earlier, and broken Borland compilers
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     template< class Path >
     std::basic_ostream< typename Path::string_type::value_type,
       typename Path::string_type::traits_type > &
@@ -615,6 +615,32 @@
       ph = str;
       return is;
     }
+# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ template< class String, class Traits >
+ std::basic_ostream< BOOST_DEDUCED_TYPENAME String::value_type,
+ BOOST_DEDUCED_TYPENAME String::traits_type > &
+ operator<<
+ ( std::basic_ostream< BOOST_DEDUCED_TYPENAME String::value_type,
+ BOOST_DEDUCED_TYPENAME String::traits_type >& os,
+ const basic_path< String, Traits > & ph )
+ {
+ os << ph.string();
+ return os;
+ }
+
+ template< class String, class Traits >
+ std::basic_istream< BOOST_DEDUCED_TYPENAME String::value_type,
+ BOOST_DEDUCED_TYPENAME String::traits_type > &
+ operator>>
+ ( std::basic_istream< BOOST_DEDUCED_TYPENAME String::value_type,
+ BOOST_DEDUCED_TYPENAME String::traits_type> & is,
+ basic_path< String, Traits > & ph )
+ {
+ String str;
+ is >> str;
+ ph = str;
+ return is;
+ }
 # endif
 
   // path::name_checks -----------------------------------------------------//


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