1
0
forked from boostorg/move

Fixes #48 ("MSVC warning C4643: Forward declaring 'nothrow_t' in namespace std is not permitted by the C++ Standard")

This commit is contained in:
Ion Gaztañaga
2021-12-26 22:05:26 +01:00
parent a51c5cc218
commit 1378bd263f
4 changed files with 24 additions and 1 deletions

View File

@ -802,6 +802,13 @@ Special thanks to:
[section:release_notes Release Notes] [section:release_notes Release Notes]
[section:release_notes_boost_1_79 Boost 1.79 Release]
* Fixed bugs:
* [@https://github.com/boostorg/move/issues/48 Git Issue #48: ['"MSVC warning C4643: Forward declaring 'nothrow_t' in namespace std is not permitted by the C++ Standard"]].
[endsect]
[section:release_notes_boost_1_78 Boost 1.78 Release] [section:release_notes_boost_1_78 Boost 1.78 Release]
* Fixed bugs: * Fixed bugs:

View File

@ -24,7 +24,11 @@
#define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std) #define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std)
#define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE #define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE
#else #else
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
#pragma warning (push)
#pragma warning (disable : 4643) // Forward declaring 'X' in namespace std is not permitted by the C++ Standard
#endif
#define BOOST_MOVE_STD_NS_BEG namespace std{ #define BOOST_MOVE_STD_NS_BEG namespace std{
#define BOOST_MOVE_STD_NS_END } #define BOOST_MOVE_STD_NS_END }
#endif #endif

View File

@ -11,4 +11,6 @@
#ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH #ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH #undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
#elif defined(_MSC_VER) && (_MSC_VER >= 1915)
#pragma warning (pop)
#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH #endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH

View File

@ -38,12 +38,22 @@
#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
#pragma warning (push)
#pragma warning (disable : 4643) // Forward declaring 'X' in namespace std is not permitted by the C++ Standard
#endif
namespace std { //no namespace versioning in clang+libc++ namespace std { //no namespace versioning in clang+libc++
struct nothrow_t; struct nothrow_t;
} //namespace std { } //namespace std {
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
#pragma warning (pop)
#endif
namespace boost{ namespace boost{
namespace move_upmu { namespace move_upmu {