Skip to content

Commit

Permalink
Define BOOST_FILESYSTEM_NO_CXX11_DEFAULTED_RVALUE_REFS for GCC <= 4; …
Browse files Browse the repository at this point in the history
…GCC 4.8.5 was failing on FreeBSD although not on other platforms. Since move semantics is an optimization, it doesn't break anything to be conservative.
  • Loading branch information
Beman committed Sep 15, 2015
1 parent 9befbd2 commit f4644ef
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions include/boost/filesystem/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@
#include <boost/detail/workaround.hpp>

// BOOST_FILESYSTEM_NO_CXX11_DEFAULTED_RVALUE_REFS -----------------------------------//

# if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) \
|| (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 4 && \
defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER==1800)
//
// Both GCC and Microsoft shipped compiler versions that supported defaulted functions
// but they did not work as expected for rvalue references. GCC was particularly
// problematic because some versions worked on some platforms but not others; FreeBSD
// was failing as recently as GCC 4.8.5.

# if (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) \
&& !defined(BOOST_FILESYSTEM_NO_CXX11_DEFAULTED_RVALUE_REFS)) \
|| (defined(__GNUC__) && __GNUC__ <= 4) \
|| (defined(_MSC_VER) && _MSC_VER==1800)
# define BOOST_FILESYSTEM_NO_CXX11_DEFAULTED_RVALUE_REFS
# endif

Expand Down

0 comments on commit f4644ef

Please sign in to comment.