From 0a6556cf9aa3e733965b6a18574efd63b54caa0d Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 4 Nov 2022 23:37:27 +0100 Subject: [PATCH] Kill the now useless type xbt::string --- docs/source/conf.py | 2 - include/simgrid/s4u/Actor.hpp | 2 +- include/simgrid/s4u/Host.hpp | 2 +- include/simgrid/s4u/Mailbox.hpp | 3 +- include/xbt/string.hpp | 293 +------------------------ src/bindings/python/simgrid_python.cpp | 26 +-- src/kernel/activity/MailboxImpl.hpp | 5 +- src/kernel/actor/ActorImpl.cpp | 12 +- src/kernel/actor/ActorImpl.hpp | 10 +- src/kernel/actor/CommObserver.cpp | 2 +- src/kernel/resource/WifiLinkImpl.hpp | 2 +- src/mc/ModelChecker.hpp | 7 +- src/mc/remote/RemoteProcess.hpp | 4 +- src/s4u/s4u_Actor.cpp | 2 +- src/s4u/s4u_Host.cpp | 2 +- src/s4u/s4u_Mailbox.cpp | 2 +- src/surf/HostImpl.hpp | 4 +- src/xbt/string.cpp | 10 - 18 files changed, 37 insertions(+), 353 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index cda228d4b5..b84834c4f1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -129,7 +129,6 @@ nitpick_ignore = [ ('cpp:identifier', 'simgrid::s4u::Activity_T'), ('cpp:identifier', 'simgrid::s4u::this_actor'), ('cpp:identifier', 'simgrid::xbt'), - ('cpp:identifier', 'simgrid::xbt::string'), ('cpp:identifier', 'size_t'), ('cpp:identifier', 'ssize_t'), ('cpp:identifier', 'this_actor'), @@ -161,7 +160,6 @@ nitpick_ignore = [ ('cpp:identifier', 'xbt::signal'), ('cpp:identifier', 'xbt::signal'), ('cpp:identifier', 'xbt::signal'), - ('cpp:identifier', 'xbt::string'), ] # For cross-ref generation diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index b75614c5f1..199ac8087f 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -322,7 +322,7 @@ public: static bool is_maestro(); /** Retrieves the name of that actor as a C++ string */ - const simgrid::xbt::string& get_name() const; + const std::string& get_name() const; /** Retrieves the name of that actor as a C string */ const char* get_cname() const; /** Retrieves the host on which that actor is running */ diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 8fbe49484b..bae7f7396d 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -87,7 +87,7 @@ public: static Host* current(); /** Retrieves the name of that host as a C++ string */ - xbt::string const& get_name() const; + std::string const& get_name() const; /** Retrieves the name of that host as a C string */ const char* get_cname() const; diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index 96dab88c23..a885cbad11 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -36,7 +35,7 @@ protected: public: /** @brief Retrieves the name of that mailbox as a C++ string */ - const xbt::string& get_name() const; + const std::string& get_name() const; /** @brief Retrieves the name of that mailbox as a C string */ const char* get_cname() const; diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index a4624489fb..c382100355 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -6,24 +6,12 @@ #ifndef SIMGRID_XBT_STRING_HPP #define SIMGRID_XBT_STRING_HPP -#include +#include "xbt/base.h" #include #include #include -#if SIMGRID_HAVE_MC - -#include -#include -#include -#include -#include - -#include - -#endif - namespace simgrid { namespace xbt { @@ -39,281 +27,6 @@ XBT_PUBLIC std::string string_printf(const char* fmt, ...) XBT_ATTRIB_PRINTF(1, */ XBT_PUBLIC std::string string_vprintf(const char* fmt, va_list ap) XBT_ATTRIB_PRINTF(1, 0); -#if SIMGRID_HAVE_MC - -/** POD structure representation of a string - */ -struct string_data { - char* data; - std::size_t len; -}; - -/** A std::string-like with well-known representation - * - * HACK, this is a (incomplete) replacement for `std::string`. - * It has a fixed POD representation (`simgrid::xbt::string_data`) - * which can be used to easily read the string content from another - * process. - * - * The internal representation of a `std::string` is private. - * We could add some code to read this for a given implementation. - * However, even if we focus on GNU libstdc++ with Itanium ABI - * GNU libstdc++ currently has two different ABIs - * - * * the pre-C++11 is a pointer to a ref-counted - * string-representation (with support for COW); - * - * * the [C++11-conforming implementation](https://gcc.gnu.org/gcc-5/changes.html) - * does not use refcouting/COW but has a small string optimization. - */ -class XBT_PUBLIC string { - static char NUL; - string_data str; - -public: - // Types - using size_type = std::size_t; - using reference = char&; - using const_reference = const char&; - using iterator = char*; - using const_iterator = const char*; - - // Dtor - ~string() - { - if (str.data != &NUL) - delete[] str.data; - } - - // Ctors - string(const char* s, size_t size) - { - if (size == 0) { - str.len = 0; - str.data = &NUL; - } else { - str.len = size; - str.data = new char[str.len + 1]; - std::copy_n(s, str.len, str.data); - str.data[str.len] = '\0'; - } - } - string() : string(&NUL, 0) {} - explicit string(const char* s) : string(s, strlen(s)) {} - string(string const& s) : string(s.c_str(), s.size()) {} - string(string&& s) noexcept : str(s.str) - { - s.str.len = 0; - s.str.data = &NUL; - } - explicit string(std::string const& s) : string(s.c_str(), s.size()) {} - - // Assign - void assign(const char* s, size_t size) - { - if (str.data != &NUL) { - delete[] str.data; - str.data = nullptr; - str.len = 0; - } - if (size != 0) { - str.len = size; - str.data = new char[str.len + 1]; - std::copy_n(s, str.len, str.data); - str.data[str.len] = '\0'; - } - } - - // Copy - string& operator=(const char* s) - { - assign(s, std::strlen(s)); - return *this; - } - string& operator=(string const& s) - { - if (this != &s) - assign(s.c_str(), s.size()); - return *this; - } - string& operator=(std::string const& s) - { - assign(s.c_str(), s.size()); - return *this; - } - - // Capacity - size_t size() const { return str.len; } - size_t length() const { return str.len; } - bool empty() const { return str.len == 0; } - void shrink_to_fit() { /* Being there, but doing nothing */} - - // Element access - char* data() { return str.data; } - const char* data() const { return str.data; } - char* c_str() { return str.data; } - const char* c_str() const { return str.data; }; - reference at(size_type i) - { - if (i >= size()) - throw std::out_of_range("Out of range"); - return data()[i]; - } - const_reference at(size_type i) const - { - if (i >= size()) - throw std::out_of_range("Out of range"); - return data()[i]; - } - reference operator[](size_type i) - { - return data()[i]; - } - const_reference operator[](size_type i) const - { - return data()[i]; - } - // Conversion - static const string_data& to_string_data(const string& s) { return s.str; } - operator std::string() const { return std::string(this->c_str(), this->size()); } - - // Iterators - iterator begin() { return data(); } - iterator end() { return data() + size(); } - const_iterator begin() const { return data(); } - const_iterator end() const { return data() + size(); } - const_iterator cbegin() const { return data(); } - const_iterator cend() const { return data() + size(); } - // (Missing, reverse iterators) - - // Operations - void clear() - { - str.len = 0; - str.data = &NUL; - } - - size_t copy(char* s, size_t len, size_t pos = 0) const - { - if (pos > str.len) - throw std::out_of_range(string_printf("xbt::string::copy with pos > size() (%zu > %zu)", pos, str.len)); - size_t count = std::min(len, str.len - pos); - std::copy_n(str.data + pos, count, s); - return count; - } - - bool equals(const char* data, std::size_t len) const - { - return this->size() == len - && std::memcmp(this->c_str(), data, len) == 0; - } - - bool operator==(string const& that) const - { - return this->equals(that.c_str(), that.size()); - } - bool operator==(std::string const& that) const - { - return this->equals(that.c_str(), that.size()); - } - bool operator==(const char* that) const - { - return this->equals(that, std::strlen(that)); - } - - template - bool operator!=(X const& that) const - { - return not (*this == that); - } - - // Compare: - int compare(const char* data, std::size_t len) const - { - size_t n = std::min(this->size(), len); - int res = memcmp(this->c_str(), data, n); - if (res != 0) - return res; - else if (this->size() == len) - return 0; - else if (this->size() < len) - return -1; - else - return 1; - } - int compare(string const& that) const - { - return this->compare(that.c_str(), that.size()); - } - int compare(std::string const& that) const - { - return this->compare(that.c_str(), that.size()); - } - int compare(const char* that) const - { - return this->compare(that, std::strlen(that)); - } - - // Define < <= >= > in term of compare(): - template - bool operator<(X const& that) const - { - return this->compare(that) < 0; - } - template - bool operator<=(X const& that) const - { - return this->compare(that) <= 0; - } - template - bool operator>(X const& that) const - { - return this->compare(that) > 0; - } - template - bool operator>=(X const& that) const - { - return this->compare(that) >= 0; - } -}; - -inline -bool operator==(std::string const& a, string const& b) -{ - return b == a; -} -inline -bool operator!=(std::string const& a, string const& b) -{ - return b != a; -} -inline -bool operator<(std::string const& a, string const& b) -{ - return b > a; +} // namespace xbt } -inline -bool operator<=(std::string const& a, string const& b) -{ - return b >= a; -} -inline -bool operator>(std::string const& a, string const& b) -{ - return b < a; -} -inline -bool operator>=(std::string const& a, string const& b) -{ - return b <= a; -} - -#else - -typedef std::string string; - -#endif -} -} - -#endif +#endif \ No newline at end of file diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index e1c42ed8b4..99e52535c4 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -454,13 +454,9 @@ PYBIND11_MODULE(simgrid, m) }, "The current pstate (read/write property).") .def_static("current", &Host::current, py::call_guard(), - "Retrieves the host on which the running actor is located.") + "Retrieves the host on which the running actor is located.") .def_property_readonly( - "name", - [](const Host* self) { - return std::string(self->get_name().c_str()); // Convert from xbt::string because of MC - }, - "The name of this host (read-only property).") + "name", [](const Host* self) { return self->get_name(); }, "The name of this host (read-only property).") .def_property_readonly("load", &Host::get_load, "Returns the current computation load (in flops per second), NOT taking the external load " "into account. This is the currently achieved speed (read-only property).") @@ -603,11 +599,7 @@ PYBIND11_MODULE(simgrid, m) .def_static("by_name", &Link::by_name, "Retrieves a Link from its name, or dies") .def("seal", &Link::seal, py::call_guard(), "Seal this link") .def_property_readonly( - "name", - [](const Link* self) { - return std::string(self->get_name().c_str()); // Convert from xbt::string because of MC - }, - "The name of this link") + "name", [](const Link* self) { return self->get_name(); }, "The name of this link") .def_property_readonly("bandwidth", &Link::get_bandwidth, "The bandwidth (in bytes per second) (read-only property).") .def_property_readonly("latency", &Link::get_latency, "The latency (in seconds) (read-only property)."); @@ -656,15 +648,10 @@ PYBIND11_MODULE(simgrid, m) .def( "__str__", [](const Mailbox* self) { return std::string("Mailbox(") + self->get_cname() + ")"; }, "Textual representation of the Mailbox`") - .def_static("by_name", &Mailbox::by_name, - py::call_guard(), - py::arg("name"), + .def_static("by_name", &Mailbox::by_name, py::call_guard(), py::arg("name"), "Retrieve a Mailbox from its name") .def_property_readonly( - "name", - [](const Mailbox* self) { - return std::string(self->get_name().c_str()); // Convert from xbt::string because of MC - }, + "name", [](const Mailbox* self) { return self->get_name(); }, "The name of that mailbox (read-only property).") .def_property_readonly("ready", &Mailbox::ready, py::call_guard(), "Check if there is a communication ready to be consumed from a mailbox.") @@ -695,8 +682,7 @@ PYBIND11_MODULE(simgrid, m) data.inc_ref(); return self->put_init(data.ptr(), size); }, - py::call_guard(), - "Creates (but don’t start) a data transmission to that mailbox.") + py::call_guard(), "Creates (but don’t start) a data transmission to that mailbox.") .def( "get", [](Mailbox* self) { diff --git a/src/kernel/activity/MailboxImpl.hpp b/src/kernel/activity/MailboxImpl.hpp index 353b963e73..69d65b3ae3 100644 --- a/src/kernel/activity/MailboxImpl.hpp +++ b/src/kernel/activity/MailboxImpl.hpp @@ -7,7 +7,6 @@ #define SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP #include -#include #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Mailbox.hpp" @@ -22,7 +21,7 @@ class MailboxImpl { static constexpr size_t MAX_MAILBOX_SIZE = 10000000; s4u::Mailbox piface_; - xbt::string name_; + std::string name_; actor::ActorImplPtr permanent_receiver_; // actor to which the mailbox is attached boost::circular_buffer_space_optimized comm_queue_{MAX_MAILBOX_SIZE}; // messages already received in the permanent receive mode @@ -48,7 +47,7 @@ public: const s4u::Mailbox* get_iface() const { return &piface_; } s4u::Mailbox* get_iface() { return &piface_; } - const xbt::string& get_name() const { return name_; } + const std::string& get_name() const { return name_; } const char* get_cname() const { return name_.c_str(); } void set_receiver(s4u::ActorPtr actor); void push(CommImplPtr comm); diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index e308692bd8..c863647e97 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -34,7 +34,7 @@ ActorImpl* ActorImpl::self() return (self_context != nullptr) ? self_context->get_actor() : nullptr; } -ActorImpl::ActorImpl(xbt::string name, s4u::Host* host, aid_t ppid) +ActorImpl::ActorImpl(std::string name, s4u::Host* host, aid_t ppid) : ActorIDTrait(std::move(name), ppid), host_(host), piface_(this) { simcall_.issuer_ = this; @@ -66,7 +66,7 @@ ActorImplPtr ActorImpl::attach(const std::string& name, void* data, s4u::Host* h throw HostFailureException(XBT_THROW_POINT, "Cannot attach actor on failed host."); } - auto* actor = new ActorImpl(xbt::string(name), host, /*ppid*/ -1); + auto* actor = new ActorImpl(std::string(name), host, /*ppid*/ -1); /* Actor data */ actor->piface_.set_data(data); actor->code_ = nullptr; @@ -418,7 +418,7 @@ void ActorImpl::set_host(s4u::Host* dest) ActorImplPtr ActorImpl::init(const std::string& name, s4u::Host* host) const { - auto* actor = new ActorImpl(xbt::string(name), host, get_pid()); + auto* actor = new ActorImpl(name, host, get_pid()); intrusive_ptr_add_ref(actor); /* The on_creation() signal must be delayed until there, where the pid and everything is set */ @@ -461,9 +461,9 @@ ActorImplPtr ActorImpl::create(const std::string& name, const ActorCode& code, v ActorImplPtr actor; if (parent_actor != nullptr) - actor = parent_actor->init(xbt::string(name), host); + actor = parent_actor->init(name, host); else - actor = self()->init(xbt::string(name), host); + actor = self()->init(name, host); actor->piface_.set_data(data); /* actor data */ @@ -496,7 +496,7 @@ void create_maestro(const std::function& code) { auto* engine = EngineImpl::get_instance(); /* Create maestro actor and initialize it */ - auto* maestro = new ActorImpl(xbt::string(""), /*host*/ nullptr, /*ppid*/ -1); + auto* maestro = new ActorImpl(/*name*/ "", /*host*/ nullptr, /*ppid*/ -1); if (not code) { maestro->context_.reset(engine->get_context_factory()->create_context(ActorCode(), maestro)); diff --git a/src/kernel/actor/ActorImpl.hpp b/src/kernel/actor/ActorImpl.hpp index 8f6f640aee..34b61deac8 100644 --- a/src/kernel/actor/ActorImpl.hpp +++ b/src/kernel/actor/ActorImpl.hpp @@ -21,15 +21,15 @@ class ProcessArg; /*------------------------- [ ActorIDTrait ] -------------------------*/ class XBT_PUBLIC ActorIDTrait { - xbt::string name_; - aid_t pid_ = 0; - aid_t ppid_ = -1; + std::string name_; + aid_t pid_ = 0; + aid_t ppid_ = -1; static unsigned long maxpid_; public: explicit ActorIDTrait(const std::string& name, aid_t ppid); - const xbt::string& get_name() const { return name_; } + const std::string& get_name() const { return name_; } const char* get_cname() const { return name_.c_str(); } aid_t get_pid() const { return pid_; } aid_t get_ppid() const { return ppid_; } @@ -64,7 +64,7 @@ class XBT_PUBLIC ActorImpl : public xbt::PropertyHolder, public ActorIDTrait, pu friend activity::MailboxImpl; public: - ActorImpl(xbt::string name, s4u::Host* host, aid_t ppid); + ActorImpl(std::string name, s4u::Host* host, aid_t ppid); ActorImpl(const ActorImpl&) = delete; ActorImpl& operator=(const ActorImpl&) = delete; ~ActorImpl(); diff --git a/src/kernel/actor/CommObserver.cpp b/src/kernel/actor/CommObserver.cpp index 73eb450b64..9c556193a3 100644 --- a/src/kernel/actor/CommObserver.cpp +++ b/src/kernel/actor/CommObserver.cpp @@ -119,7 +119,7 @@ static std::string to_string_activity_wait(const activity::ActivityImpl* act) return std::string("CommWait(comm_id:") + ptr_to_id(comm) + " src:" + std::to_string(comm->src_actor_ != nullptr ? comm->src_actor_->get_pid() : -1) + " dst:" + std::to_string(comm->dst_actor_ != nullptr ? comm->dst_actor_->get_pid() : -1) + - " mbox:" + std::string(comm->get_mailbox() == nullptr ? xbt::string("-") : comm->get_mailbox()->get_name()) + + " mbox:" + std::string(comm->get_mailbox() == nullptr ? std::string("-") : comm->get_mailbox()->get_name()) + "(id:" + std::to_string(comm->get_mailbox_id()) + ") srcbuf:" + src_buff_id + " dstbuf:" + dst_buff_id + " bufsize:" + std::to_string(comm->src_buff_size_) + ")"; } else { diff --git a/src/kernel/resource/WifiLinkImpl.hpp b/src/kernel/resource/WifiLinkImpl.hpp index a8755660de..811734d61f 100644 --- a/src/kernel/resource/WifiLinkImpl.hpp +++ b/src/kernel/resource/WifiLinkImpl.hpp @@ -21,7 +21,7 @@ class XBT_PRIVATE WifiLinkAction; class WifiLinkImpl : public StandardLinkImpl { /** @brief Hold every rates association between host and links (host name, rates id) */ - std::map host_rates_; + std::map host_rates_; /** @brief A link can have several bandwidths attached to it (mostly use by wifi model) */ std::vector bandwidths_; diff --git a/src/mc/ModelChecker.hpp b/src/mc/ModelChecker.hpp index 09fbfcbdf6..787bd04d1b 100644 --- a/src/mc/ModelChecker.hpp +++ b/src/mc/ModelChecker.hpp @@ -10,7 +10,6 @@ #include "src/mc/remote/RemotePtr.hpp" #include "src/mc/sosp/PageStore.hpp" #include "xbt/base.h" -#include "xbt/string.hpp" #include #include @@ -22,7 +21,7 @@ namespace simgrid::mc { class ModelChecker { CheckerSide checker_side_; /** String pool for host names */ - std::set> hostnames_; + std::set> hostnames_; // This is the parent snapshot of the current state: PageStore page_store_{500}; std::unique_ptr remote_process_; @@ -41,9 +40,9 @@ public: Channel& channel() { return checker_side_.get_channel(); } PageStore& page_store() { return page_store_; } - xbt::string const& get_host_name(const char* hostname) + std::string const& get_host_name(const char* hostname) { - return *this->hostnames_.insert(xbt::string(hostname)).first; + return *this->hostnames_.insert(std::string(hostname)).first; } void start(); diff --git a/src/mc/remote/RemoteProcess.hpp b/src/mc/remote/RemoteProcess.hpp index 4dc3dfd9bb..3fd75d8846 100644 --- a/src/mc/remote/RemoteProcess.hpp +++ b/src/mc/remote/RemoteProcess.hpp @@ -27,8 +27,8 @@ public: Remote copy; /** Hostname (owned by `mc_model_checker->hostnames_`) */ - const xbt::string* hostname = nullptr; - xbt::string name; + const std::string* hostname = nullptr; + std::string name; void clear() { diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index e4ec4be8c9..340126bb1b 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -188,7 +188,7 @@ bool Actor::is_maestro() return self == nullptr || kernel::EngineImpl::get_instance()->is_maestro(self); } -const simgrid::xbt::string& Actor::get_name() const +const std::string& Actor::get_name() const { return this->pimpl_->get_name(); } diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 35357f8d94..4266d80987 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -84,7 +84,7 @@ Host* Host::current() return self->get_host(); } -xbt::string const& Host::get_name() const +std::string const& Host::get_name() const { return this->pimpl_->get_name(); } diff --git a/src/s4u/s4u_Mailbox.cpp b/src/s4u/s4u_Mailbox.cpp index 4621305dfd..2caa4ec50c 100644 --- a/src/s4u/s4u_Mailbox.cpp +++ b/src/s4u/s4u_Mailbox.cpp @@ -14,7 +14,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel, s4u, "S4U Communication Mailboxes") namespace simgrid::s4u { -const xbt::string& Mailbox::get_name() const +const std::string& Mailbox::get_name() const { return pimpl_->get_name(); } diff --git a/src/surf/HostImpl.hpp b/src/surf/HostImpl.hpp index e2533b2a60..13c0772571 100644 --- a/src/surf/HostImpl.hpp +++ b/src/surf/HostImpl.hpp @@ -50,7 +50,7 @@ class XBT_PRIVATE HostImpl : public xbt::PropertyHolder { s4u::Host piface_; std::map> disks_; std::map> vms_; - xbt::string name_{"noname"}; + std::string name_{"noname"}; routing::NetZoneImpl* englobing_zone_ = nullptr; bool sealed_ = false; @@ -79,7 +79,7 @@ public: virtual s4u::Host* get_iface() { return &piface_; } /** Retrieves the name of that host as a C++ string */ - xbt::string const& get_name() const { return name_; } + std::string const& get_name() const { return name_; } /** Retrieves the name of that host as a C string */ const char* get_cname() const { return name_.c_str(); } diff --git a/src/xbt/string.cpp b/src/xbt/string.cpp index 412b22e097..68b9d6d94f 100644 --- a/src/xbt/string.cpp +++ b/src/xbt/string.cpp @@ -3,21 +3,11 @@ /* 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. */ -#include #include #include -#include -#include - namespace simgrid::xbt { -#if SIMGRID_HAVE_MC - -char string::NUL = '\0'; - -#endif - std::string string_vprintf(const char *fmt, va_list ap) { // Get the size: -- 2.20.1