diff --git a/simgear/misc/path_test.cxx b/simgear/misc/path_test.cxx index 2d789e64..4d976e01 100644 --- a/simgear/misc/path_test.cxx +++ b/simgear/misc/path_test.cxx @@ -27,7 +27,7 @@ using std::endl; void test_dir() { simgear::Dir temp = simgear::Dir::tempDir("foo"); - cout << "created:" << temp.path().str() << endl; + cout << "created:" << temp.path() << endl; VERIFY(temp.exists()); VERIFY(temp.path().isDir()); diff --git a/simgear/misc/sg_path.hxx b/simgear/misc/sg_path.hxx index e71c5f54..c19b977d 100644 --- a/simgear/misc/sg_path.hxx +++ b/simgear/misc/sg_path.hxx @@ -236,6 +236,13 @@ private: mutable time_t _modTime; }; +/// Output to an ostream +template +inline +std::basic_ostream& +operator<<(std::basic_ostream& s, const SGPath& p) +{ return s << "Path \"" << p.str() << "\""; } + /** * Split a directory string into a list of it's parent directories.