Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use std::string in simgrid::mc::request_to_string
[simgrid.git] / include / xbt / string.hpp
index 9840855..be542c0 100644 (file)
@@ -9,20 +9,26 @@
 
 #include <simgrid_config.h>
 
+#include <string>
+#include <cstdarg>
+
 #if HAVE_MC
 
 #include <stdexcept>
 #include <cstddef>
 #include <cstdlib>
 #include <cstring>
-#include <string>
 #include <iterator>
 
 #include <xbt/sysdep.h>
 
+#endif
+
 namespace simgrid {
 namespace xbt {
 
+#if HAVE_MC
+
 /** POD structure representation of a string
  */
 struct string_data {
@@ -281,21 +287,16 @@ bool operator>=(std::string const& a, string const& b)
   return b <= a;
 }
 
-}
-}
-
 #else
 
-#include <string>
+typedef std::string string;
 
-namespace simgrid {
-namespace xbt {
+#endif
 
-typedef std::string string;
+std::string string_vprintf(const char *fmt, va_list ap);
+std::string string_printf(const char *fmt, ...);
 
 }
 }
 
 #endif
-
-#endif