9 # pragma GCC diagnostic ignored "-Wstringop-overread"
39 field_vector::const_iterator
it =
other.m_fields.begin ();
46 if (
text.empty())
return;
47 std::istringstream in(
text);
59 if (
text.empty())
return;
60 std::istringstream in(
text);
103 for (
size_t i = 0;
i < subrange.
fields (); ++
i) {
113 size_t sz = subrange.m_fields.size();
115 for (
size_t i = 0;
i <
sz; ++
i) {
116 m_fields.emplace_back (std::move(subrange.m_fields[
i]));
132 const size_type id_fields =
id.fields ();
134 while ((my_fields > 1) &&
139 if (my_fields == 0)
return (1);
149 if (!
f.match (
id[field_number]))
return (0);
162 while ((my_fields > 1) &&
167 if (my_fields == 0) {
172 for (
size_type field_number = 0; field_number < my_fields; field_number++) {
192 while ((my_fields > 1) &&
198 if (my_fields == 0) {
204 for (
size_type field_number = 0; field_number < my_fields; field_number++) {
208 if (field_number == 0) {
219 new_field_number < (field_number - 1);
220 ++new_field_number) {
221 new_result <<
result[new_field_number];
241 const Range& me = *
this;
256 const Range& me = *
this;
262 bool is_match =
true;
267 if (
f.empty())
return 0;
268 if (
f.isEnumerated()) {
277 if (
id[
level] <=
f.get_values()[j]) {
278 if (
id[
level] !=
f.get_values()[j]) {
288 if (
f.get_maximum() <
id[
level]) {
292 }
else if (
id[
level] <
f.get_minimum()) {
300 if (!is_match)
break;
309 card *=
f.get_indices();
324 const Range& me = *
this;
325 if ((
fields () == 0) || (
other.fields () == 0))
return (
false);
329 if (!
f1.overlaps_with (
f2))
return (
false);
340 const Range& me = *
this;
341 s << (std::string) me <<
" (";
359 s <<
"=" << allbits <<
") ";
363 Range::operator std::string ()
const {
367 while ((my_fields > 1) &&
368 (m_fields[my_fields-1].
empty())) {
371 if (my_fields == 0)
return (
result);
373 for (
size_type field_number = 0; field_number < my_fields; field_number++) {
374 const field&
f = m_fields[field_number];
375 if (field_number > 0)
result +=
"/";
385 field_vector::const_iterator
it1 =
m_fields.begin();
386 field_vector::const_iterator it2 =
other.m_fields.begin();
387 field_vector::const_iterator last =
m_fields.end();
388 for (;
it1 != last; ++
it1, ++it2) {
389 if ((*
it1) != (*it2))
return false;
408 for (
int c{};
c!=EOF;
c=in.peek()){
412 if (
int c = in.peek();(
c ==
'/') or (
c ==
' ')){