mirror of
https://github.com/boostorg/assert.git
synced 2025-07-29 20:07:18 +02:00
Do not include <iosfwd> or declare operator<< when BOOST_NO_IOSTREAM is defined. Fixes #43.
This commit is contained in:
@ -9,11 +9,14 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#if !defined(BOOST_NO_IOSTREAM)
|
||||
#include <iosfwd>
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
||||
# include <source_location>
|
||||
#endif
|
||||
@ -132,12 +135,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_IOSTREAM)
|
||||
|
||||
template<class E, class T> std::basic_ostream<E, T> & operator<<( std::basic_ostream<E, T> & os, source_location const & loc )
|
||||
{
|
||||
os << loc.to_string();
|
||||
return os;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#if defined(BOOST_DISABLE_CURRENT_LOCATION)
|
||||
|
Reference in New Issue
Block a user