Skip to content

Commit 7398ab9

Browse files
committed
Fixes #292 ("Forward declarations of std types cause compilation errors on some platforms")
1 parent 974dc35 commit 7398ab9

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

doc/move.qbk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,15 @@ Special thanks to:
802802

803803
[section:release_notes Release Notes]
804804

805+
[section:release_notes_boost_1_87 Boost 1.87 Release]
806+
807+
* Fixed bugs:
808+
* [@https://github.com/boostorg/move/issues/292 Git Issue #292: ['"Forward declarations of std types cause compilation errors on some platforms"]].
809+
810+
[endsect]
811+
812+
Forward declarations of std types cause compilation errors on some platforms #292
813+
805814
[section:release_notes_boost_1_85 Boost 1.85 Release]
806815

807816
* Fixed bugs:

include/boost/move/detail/std_ns_begin.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2
2424
#define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std)
2525
#define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE
26-
#else
27-
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
28-
#pragma warning (push)
29-
#pragma warning (disable : 4643) // Forward declaring 'X' in namespace std is not permitted by the C++ Standard
30-
#endif
26+
#elif defined(BOOST_DINKUMWARE_STDLIB)
27+
#define BOOST_MOVE_STD_NS_BEG _STD_BEGIN
28+
#define BOOST_MOVE_STD_NS_END _STD_END
29+
#endif
3130

32-
#define BOOST_MOVE_STD_NS_BEG namespace std{
33-
#define BOOST_MOVE_STD_NS_END }
31+
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
32+
#pragma warning (push)
33+
#pragma warning (disable : 4643) // Forward declaring 'X' in namespace std is not permitted by the C++ Standard
3434
#endif

include/boost/move/detail/std_ns_end.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
#elif defined(_MSC_VER) && (_MSC_VER >= 1915)
1515
#pragma warning (pop)
1616
#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
17+
18+
#undef BOOST_MOVE_STD_NS_BEG
19+
#undef BOOST_MOVE_STD_NS_END

0 commit comments

Comments
 (0)