Go to the documentation of this file.
15 #include <unordered_set>
18 #if __cplusplus >= 201703
19 # include <string_view>
21 # include <experimental/string_view>
23 using experimental::string_view;
42 operator std::string_view()
const {
return *
m_s; }
44 bool operator==( std::string_view other )
const {
return *
m_s == other; }
56 if (
s.empty() ) {
return {}; }
80 if (
auto pos =
s.find(
'.' ); pos != std::string_view::npos ) {
81 m_chunks.emplace_back(
s.substr( 0, pos ) );
82 s.remove_prefix( pos + 1 );
friend bool operator==(const PropertyId &lhs, const PropertyId &rhs)
PropertyId(const std::string &s)
bool operator==(std::string_view other) const
PropertyId(std::string_view s)
static std::unordered_set< std::string > storage
bool operator==(const SharedString &other) const
static const std::string * get(std::string_view s)
double * begin(CLHEP::HepVector &v)
std::size_t operator()(Gaudi::Details::PropertyId const &s) const noexcept
SharedString(std::string_view s={})
Create a new SharedString checking if the value is already in the shared storage otherwise adding it.
std::size_t hash() const noexcept
std::vector< SharedString > m_chunks
Header file for std:chrono::duration-based Counters.
bool operator==(const T &other) const
Helper to record a property identifier as a sequence of SharedString instances.
std::string wrapper for static strings where identical values actually share the memory.
bool operator==(const PropertyId &lhs, const PropertyId &rhs)