X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6e9c859b6c65157cf6d11a777ed1ceb9224704eb..eb06cc6409cdd8e1e9955e4455d104ca0cf437b3:/include/xbt/string.hpp diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index 2fcd61ae51..912fe8dd6a 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,14 +8,14 @@ #include -#include #include +#include +#include -#if HAVE_MC +#if SIMGRID_HAVE_MC #include #include -#include #include #include @@ -27,7 +26,7 @@ namespace simgrid { namespace xbt { -#if HAVE_MC +#if SIMGRID_HAVE_MC /** POD structure representation of a string */ @@ -165,10 +164,7 @@ public: return data()[i]; } // Conversion - operator std::string() const - { - return std::string(this->c_str(), this->size()); - } + operator std::string() const { return std::string(this->c_str(), this->size()); } // Iterators iterator begin() { return data(); } @@ -208,7 +204,7 @@ public: template bool operator!=(X const& that) const { - return !((*this) == that); + return not (*this == that); } // Compare: @@ -298,9 +294,18 @@ typedef std::string string; #endif -std::string string_vprintf(const char *fmt, va_list ap); +/** Create a C++ string from a C-style format + * + * @ingroup XBT_str +*/ std::string string_printf(const char *fmt, ...); +/** Create a C++ string from a C-style format + * + * @ingroup XBT_str +*/ +std::string string_vprintf(const char *fmt, va_list ap); + } }