diff --git a/include/boost/assert/source_location.hpp b/include/boost/assert/source_location.hpp index c6eae32..3c2d60e 100644 --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp @@ -9,11 +9,14 @@ #include #include -#include #include #include #include +#if !defined(BOOST_NO_IOSTREAM) +#include +#endif + #if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L # include #endif @@ -132,12 +135,16 @@ public: } }; +#if !defined(BOOST_NO_IOSTREAM) + template std::basic_ostream & operator<<( std::basic_ostream & os, source_location const & loc ) { os << loc.to_string(); return os; } +#endif + } // namespace boost #if defined(BOOST_DISABLE_CURRENT_LOCATION)