forked from boostorg/core
Deprecated boost/iterator.hpp, emit warnings on inclusion.
The header defines boost::iterator template, which is an alias for std::iterator, which is itself deprecated since C++17. Updated test to avoid testing the definition in C++17 onwards to avoid failures due to deprecation warnings from libc++-13.
This commit is contained in:
@@ -8,8 +8,15 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
|
||||
#define BOOST_ALLOW_DEPRECATED_HEADERS
|
||||
#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// std::iterator template is deprecated in C++17. Some standard libraries emit warnings
|
||||
// that cannot be easily suppressed, so disable the tests in C++17 onwards.
|
||||
#if BOOST_CXX_VERSION < 201703
|
||||
|
||||
#include <boost/iterator.hpp>
|
||||
#include <boost/core/is_same.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
@@ -69,3 +76,11 @@ int main()
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
#else // BOOST_CXX_VERSION < 201703
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // BOOST_CXX_VERSION < 201703
|
||||
|
Reference in New Issue
Block a user