summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformCxxTests.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-29 13:20:08 (GMT)
committerBrad King <brad.king@kitware.com>2005-03-29 13:20:08 (GMT)
commit22f6d68be3e6630b21bb17de63273965de44ee45 (patch)
tree8225f2a9c0bb6fb085e482bc04f44bfb7e7a8e5d /Source/kwsys/kwsysPlatformCxxTests.cxx
parentc7a2c80c178457b4d8a1525a6b0ccff9ca4e5afa (diff)
downloadCMake-22f6d68be3e6630b21bb17de63273965de44ee45.zip
CMake-22f6d68be3e6630b21bb17de63273965de44ee45.tar.gz
CMake-22f6d68be3e6630b21bb17de63273965de44ee45.tar.bz2
ENH: Added istream and ostream operators for stl string in KWSys when using old streams that do not provide them.
Diffstat (limited to 'Source/kwsys/kwsysPlatformCxxTests.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx
index a799c50..d8454fd 100644
--- a/Source/kwsys/kwsysPlatformCxxTests.cxx
+++ b/Source/kwsys/kwsysPlatformCxxTests.cxx
@@ -30,6 +30,30 @@ int main() { return 0; }
int main() { return 0; }
#endif
+#ifdef TEST_KWSYS_STL_STRING_HAVE_OSTREAM
+# if KWSYS_STL_HAVE_STD
+# define kwsys_stl std
+# else
+# define kwsys_stl
+# endif
+# include <iostream.h>
+# include <string>
+void f(ostream& os, const kwsys_stl::string& s) { os << s; }
+int main() { return 0; }
+#endif
+
+#ifdef TEST_KWSYS_STL_STRING_HAVE_ISTREAM
+# if KWSYS_STL_HAVE_STD
+# define kwsys_stl std
+# else
+# define kwsys_stl
+# endif
+# include <iostream.h>
+# include <string>
+void f(istream& is, kwsys_stl::string& s) { is >> s; }
+int main() { return 0; }
+#endif
+
#ifdef TEST_KWSYS_STAT_HAS_ST_MTIM
#include <sys/types.h>
#include <sys/stat.h>