Сould anyone please describe such behavior of std::regex library
string a{"ERROR"};
regex r1{"errOR",0};
cout<<regex_search(a,r1)<<endl;
regex r2{"errOR"};
cout<<regex_search(a,r2)<<endl;
regex r3{"errOR",regex::ECMAScript};
cout<<regex_search(a,r3)<<endl;
cout<<r1.flags()<<endl;
cout<<r2.flags()<<endl;
cout<<r3.flags()<<endl;
gives output
1
0
0
16
16
16
so 1st example became implicitly ignore casing with sum of flags corresponding to default construction of re i.e 16, by the way in std::regex there is no constant that match 0 value, but there is regex::icase == 1;
Is that conceived behavior of std library or I should not to feed to constructor values that explicitly not supported?