7#include "GaudiKernel/MsgStream.h"
16template <
typename Stream,
typename CHAR>
18 if (v.empty())
return;
21 for (
auto value : v | std::views::drop(1)) {
34 if (text.empty())
return;
35 const char *start = text.c_str();
36 const char *last = start+text.size();
37 static constexpr auto ok=std::errc{};
40 for (
const char * p=start;p<last;++p){
41 auto [ptr,ec] = std::from_chars(p, last,v);
43 if (ec != ok)
continue;
48 const std::string
msg =
"ExpandedIdentifier::set: '"+ text +
"' is not a valid input string.";
49 throw std::invalid_argument(
msg);
55ExpandedIdentifier::operator std::string ()
const {
57 std::ostringstream oss;
std::ostream & operator<<(std::ostream &out, const ExpandedIdentifier &id)
static void stream_vector(Stream &out, const ExpandedIdentifier::element_vector &v, CHAR sep)
void show(std::ostream &out) const
Display detail to ostream.
void set(const std::string &text)
build from a textual description
ExpandedIdentifier()=default
void add(element_type value)
Append a value into a new field.
void clear()
Erase all fields.
CxxUtils::inplace_vector< element_type, 12 > element_vector