20 std::vector<std::pair<int, int>>
result;
25 const bool is_valid = (
s.front() ==
'{') and (
s.back() ==
'}');
26 if (not is_valid)
return result;
27 auto is_digit=[](
const char c)->
bool{
28 return (
c>=
'0') and (
c<=
'9');
30 auto is_quote=[](
const char c)->
bool{
33 const auto *
pc=
s.data();
34 const auto *
const pcEnd=
pc+
s.size();
37 static constexpr std::errc success{};
42 pc=std::find_if(
pc,pcEnd,is_quote);
45 const auto &[
ptr, errCode] = std::from_chars(++
pc, pcEnd,
hash);
46 if (errCode!= success){
47 throw std::runtime_error(
"Bad hash conversion from database string in PixelConditionsAlgorithms::parseDeadMapString:" +
s+
".");
50 pc=std::find_if(
ptr,pcEnd,is_digit);
51 const auto &[ptr2, errCode2] = std::from_chars(
pc, pcEnd,
status);
52 if (errCode2!= success){
53 throw std::runtime_error(
"Bad status conversion from database string in PixelConditionsAlgorithms::parseDeadMapString:"+
s+
".");