[filesystem] BOOST_FILESYSTEM_NO_DEPRECATED

The following code does not compile with Boost 1.36 and MSVS 2008: #define BOOST_FILESYSTEM_NO_DEPRECATED #include <boost/filesystem.hpp> In get the following error message: 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(98) : error C2275: 'boost::filesystem::path' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(49) : see declaration of 'boost::filesystem::path' 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(100) : error C2275: 'boost::filesystem::wpath' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(65) : see declaration of 'boost::filesystem::wpath' 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(103) : error C2275: 'boost::filesystem::path' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(49) : see declaration of 'boost::filesystem::path' 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(105) : error C2275: 'boost::filesystem::wpath' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(65) : see declaration of 'boost::filesystem::wpath' 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(108) : error C2275: 'boost::filesystem::path' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(49) : see declaration of 'boost::filesystem::path' 1>C:\Program Files\Boost\boost_1_36_0\boost/filesystem/convenience.hpp(110) : error C2275: 'boost::filesystem::wpath' : illegal use of this type as an expression 1> C:\Program Files\Boost\boost_1_36_0\boost/filesystem/path.hpp(65) : see declaration of 'boost::filesystem::wpath' --Johan Råde

Johan Råde wrote:
The following code does not compile with Boost 1.36 and MSVS 2008:
#define BOOST_FILESYSTEM_NO_DEPRECATED #include <boost/filesystem.hpp>
...
Oops... Fixed in trunk by changeset 48462. The bug affects all compilers, by the way. See http://svn.boost.org/trac/boost/wiki/ReleasePractices/HotFixes The test suite has been updated by changeset 48463 to run the regular tests with BOOST_FILESYSTEM_NO_DEPRECATED defined, so will detect similar problems if they pop up in the future. Thanks for the trouble report, --Beman
participants (2)
-
Beman Dawes
-
Johan Råde