X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4bb73cb3914b5f7b77a9ec1f8abe728e637cc016..aa8c0aedd4f2031f1a7356a5b0ff6569ab262b64:/include/xbt/string.hpp diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index 15bf86d824..cd51303a28 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -6,7 +6,7 @@ #ifndef SIMGRID_XBT_STRING_HPP #define SIMGRID_XBT_STRING_HPP -#include +#include #include #include @@ -54,17 +54,14 @@ struct string_data { * * the [C++11-conforming implementation](https://gcc.gnu.org/gcc-5/changes.html) * does not use refcouting/COW but has a small string optimization. */ -XBT_PUBLIC_CLASS string : private string_data { +class XBT_PUBLIC string : private string_data { static char NUL; public: // Types typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; typedef char& reference; typedef const char& const_reference; - typedef char* pointer; - typedef const char* const_pointer; typedef char* iterator; typedef const char* const_iterator; @@ -139,7 +136,7 @@ public: bool empty() const { return len != 0; } void shrink_to_fit() { /* Being there, but doing nothing */} - // Alement access + // Element access char* data() { return string_data::data; } const char* data() const { return string_data::data; } char* c_str() { return string_data::data; }