forked from boostorg/assert
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/config.hpp>
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <iosfwd>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_IOSTREAM)
|
||||||
|
#include <iosfwd>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
||||||
# include <source_location>
|
# include <source_location>
|
||||||
#endif
|
#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 )
|
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();
|
os << loc.to_string();
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
#if defined(BOOST_DISABLE_CURRENT_LOCATION)
|
#if defined(BOOST_DISABLE_CURRENT_LOCATION)
|
||||||
|
Reference in New Issue
Block a user