>From 6258d49b798d1e3ee218cba72e9d14c650518db9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 10 Feb 2016 20:46:11 +0100 Subject: [PATCH] Define operator<<() for fs::path in the right namespace To be usable even in the code not in the global namespace, this operator() needs to be defined in the namespace of one of its arguments, so define it in boost::filesystem namespace. --- path_utility.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/path_utility.hpp b/path_utility.hpp index ad802ac..f689440 100644 --- a/path_utility.hpp +++ b/path_utility.hpp @@ -61,10 +61,18 @@ void LMI_SO validate_filepath ,std::string const& context ); +namespace boost +{ +namespace filesystem +{ + inline std::ostream& operator<<(std::ostream& os, fs::path const& z) { return os << z.string(); } +} // namespace filesystem +} // namespace boost + #endif // path_utility_hpp -- 2.7.0