[Boost-bugs] [Boost C++ Libraries] #3008: Patch for Filesystem / gcc-4.4.0

Subject: [Boost-bugs] [Boost C++ Libraries] #3008: Patch for Filesystem / gcc-4.4.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-09 10:40:13


#3008: Patch for Filesystem / gcc-4.4.0
-------------------------------------+--------------------------------------
 Reporter: baraclese | Owner: bemandawes
     Type: Patches | Status: new
Milestone: | Component: filesystem
  Version: Boost Development Trunk | Severity: Showstopper
 Keywords: |
-------------------------------------+--------------------------------------
 The Filesystem library fails to compile with gcc-4.4.0:

 gcc.compile.c++
 ../../../bin.v2/libs/filesystem/build/gcc-4.4.0/debug/operations.o
 In file included from ../../../libs/filesystem/src/operations.cpp:46:
 /usr/lib/gcc/i686-pc-linux-
 gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/type_traits: In function
 â€˜bool boost::filesystem::is_empty(const boost::filesystem::path&)’:
 /usr/lib/gcc/i686-pc-linux-
 gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/type_traits:326: error:
 â€˜template<class _Tp> struct std::is_empty’ is not a function,
 ../../../boost/filesystem/operations.hpp:363: error: conflict with
 â€˜template<class Path> typename
 boost::enable_if<boost::filesystem::is_basic_path<Path>, bool>::type
 boost::filesystem::is_empty(const Path&)’
 ../../../boost/filesystem/operations.hpp:662: error: in call to
 â€˜is_empty’
 /usr/lib/gcc/i686-pc-linux-
 gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/type_traits: In function
 â€˜bool boost::filesystem::is_empty(const boost::filesystem::wpath&)’:
 /usr/lib/gcc/i686-pc-linux-
 gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/type_traits:326: error:
 â€˜template<class _Tp> struct std::is_empty’ is not a function,
 ../../../boost/filesystem/operations.hpp:363: error: conflict with
 â€˜template<class Path> typename
 boost::enable_if<boost::filesystem::is_basic_path<Path>, bool>::type
 boost::filesystem::is_empty(const Path&)’
 ../../../boost/filesystem/operations.hpp:664: error: in call to
 â€˜is_empty’


 An easy solution is to fully qualify the function name as this patch does.

 It might be necessary to fully qualify other similar function calls as
 well (is_other, is_symlink, ...), as they might conflict in the same way
 with user defined class templates, I haven't investigated that though.

 I also had to modify test/path_test.cpp, the calls to next/prior were
 ambiguous with the new std::next/std::prior.

 Tests now pass successfully using gcc-4.4.0 in c++0x mode.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3008>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC