when compiling libstdc++ with --enable-symvers=gnu-versioned-namespace std::regex complaining about private data members trying to be accessed outside the class: 22:55:46 /home/y/include/c++/4.9.2/bits/regex.h:796:30: error: ‘std::__7::basic_regex<char>::_AutomatonPtr std::__7::basic_regex<char>::_M_automaton’ is protected 22:55:46 _AutomatonPtr _M_automaton; I believe the bug is related with the __detail namespace[1] and friend classes[2] as it lacks the NAMESPACE_VERSION expansion. This happens in other lines and I believe it extends to hashmap as well. Turning data members public "fixes" the compilation problem. [1]: https://github.com/gcc-mirror/gcc/blob/e0f174323b4297f46d9109201666da42aaa55fc8/libstdc%2B%2B-v3/include/bits/regex.h#L46 [2]: https://github.com/gcc-mirror/gcc/blob/e0f174323b4297f46d9109201666da42aaa55fc8/libstdc%2B%2B-v3/include/bits/regex.h#L772
Created attachment 36564 [details] regex patch
This is due to PR 59256, but is now fixed by the changes for PR 77794. *** This bug has been marked as a duplicate of bug 77794 ***