boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

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

Closed Kojoley closed 2 years ago

Kojoley commented 2 years ago
boost/move/detail/iterator_traits.hpp(31): warning C4643: Forward declaring 'input_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/detail/iterator_traits.hpp(32): warning C4643: Forward declaring 'forward_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/detail/iterator_traits.hpp(33): warning C4643: Forward declaring 'bidirectional_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/detail/iterator_traits.hpp(34): warning C4643: Forward declaring 'random_access_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/detail/iterator_traits.hpp(35): warning C4643: Forward declaring 'output_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/detail/iterator_traits.hpp(36): warning C4643: Forward declaring 'contiguous_iterator_tag' in namespace std is not permitted by the C++ Standard.
boost/move/make_unique.hpp(43): warning C4643: Forward declaring 'nothrow_t' in namespace std is not permitted by the C++ Standard.

https://godbolt.org/z/TWKhn6TxW

igaztanaga commented 2 years ago

Boost.Move forward declares these to avoid compilation overhead when declaring simple iterators. C4643 should be off in /W4 mode, but in any case we're going to selectively disable this warning.