You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a check that the platform API macros are in sync with Boost.System.
Check that BOOST_FILESYSTEM_POSIX/WINDOWS_API and BOOST_POSIX/WINDOWS_API
are defined in the same way and error out if not. Allow users to suppress
this check (and keep their code compiling) by defining
BOOST_FILESYSTEM_ALLOW_SYSTEM_API_MISMATCH to 1 to reduce the error to
a warning or to 2 to completely disable the check.
If we diverge in platform API selection with Boost.System again, we may
want to implement our own system category that is guaranteed to be in sync
with the platform API Boost.Filesystem actually uses. But for now the two
libraries are expected to be in sync, and the added check should do.
Copy file name to clipboardExpand all lines: doc/release_history.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@
42
42
43
43
<h2>1.91.0</h2>
44
44
<ul>
45
-
<li>Boost.Filesystem now defines and uses its own platform macros <code>BOOST_FILESYSTEM_POSIX_API</code> and <code>BOOST_FILESYSTEM_WINDOWS_API</code>. The old <code>BOOST_POSIX_API</code> and <code>BOOST_WINDOWS_API</code> macros are still defined by Boost.System.</li>
45
+
<li>Boost.Filesystem now defines and uses its own platform macros <code>BOOST_FILESYSTEM_POSIX_API</code> and <code>BOOST_FILESYSTEM_WINDOWS_API</code>. The old <code>BOOST_POSIX_API</code> and <code>BOOST_WINDOWS_API</code> macros are still defined by Boost.System. Boost.Filesystem will check that the two sets of macros are in sync and by default will fail to compile if not. The compilation error can be reduced to a warning by defininig <code>BOOST_FILESYSTEM_ALLOW_SYSTEM_API_MISMATCH</code> to 1 or disabled entirely by defining it to 2. Note that in this case the error code values reported by Boost.Filesystem will not match the error category.</li>
46
46
<li>On POSIX platforms not supporting <code>openat</code> and related APIs, fixed an error reported by <code>recursive_directory_iterator</code> increment when the iterator encounters a dangling symlink and following symlinks is disabled.</li>
47
47
<li><b>Breaking change for Cygwin users.</b> The library now treats Cygwin as a POSIX platform. This has several user-facing consequences, in particular:
#error Boost.Filesystem: Platform API mismatch between Boost.System and Boost.Filesystem, reported error code values will not match the error category
74
+
#else
75
+
#include<boost/config/pragma_message.hpp>
76
+
BOOST_PRAGMA_MESSAGE("Boost.Filesystem: Platform API mismatch between Boost.System and Boost.Filesystem, reported error code values will not match the error category")
77
+
#endif
78
+
#endif
79
+
#endif
80
+
69
81
// throw an exception ----------------------------------------------------------------//
70
82
//
71
83
// Exceptions were originally thrown via boost::throw_exception().
0 commit comments