[serialization][tru64cxx65] access problem and DR45

Hello, With the recent change to strict_ansi mode, Compaq C++ compiler is stumping into some problems. Currently, Boost.Serialization fails to build because of the following: http://tinyurl.com/7cacb This is a reduced form of the layout the compiler is having a hard time with (in boost/archive/impl/basic_xml_grammar.hpp): template<class CharType> class basic_xml_grammar { private: typedef std::basic_string<CharType> StringType; public: struct return_values { StringType object_name; }; }; The compiler complains that StringType, as used in the definition of object_name, is inaccesible. I'm no C++ guru, but I understand the construct is legal according to DR45. What puzzles me is that Compaq C++ is seemingly the only compiler failing on this, when the DR45 was approved well after the standard (in 2001, I think.) Anyway, I propose to make basic_xml_grammar::StringType public, as it can really do no harm and Compaq C++ will welcome it. Any objection? Do I commit the change? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Feel free Robert Ramey JOAQUIN LOPEZ MU?Z wrote:
Hello,
With the recent change to strict_ansi mode, Compaq C++ compiler is stumping into some problems. Currently, Boost.Serialization fails to build because of the following: http://tinyurl.com/7cacb
This is a reduced form of the layout the compiler is having a hard time with (in boost/archive/impl/basic_xml_grammar.hpp):
template<class CharType> class basic_xml_grammar { private: typedef std::basic_string<CharType> StringType; public: struct return_values { StringType object_name; }; };
The compiler complains that StringType, as used in the definition of object_name, is inaccesible. I'm no C++ guru, but I understand the construct is legal according to DR45. What puzzles me is that Compaq C++ is seemingly the only compiler failing on this, when the DR45 was approved well after the standard (in 2001, I think.)
Anyway, I propose to make basic_xml_grammar::StringType public, as it can really do no harm and Compaq C++ will welcome it. Any objection? Do I commit the change?
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

"JOAQUIN LOPEZ MU?Z" <joaquin@tid.es> writes:
Anyway, I propose to make basic_xml_grammar::StringType public, as it can really do no harm and Compaq C++ will welcome it.
Making struct return_values a friend would be a more conservative move, but I don't have a strong opinion about it. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams ha escrito:
"JOAQUIN LOPEZ MU?Z" <joaquin@tid.es> writes:
Anyway, I propose to make basic_xml_grammar::StringType public, as it can really do no harm and Compaq C++ will welcome it.
Making struct return_values a friend would be a more conservative move, but I don't have a strong opinion about it.
Yep, and it's nicer too. Done that way, thanks! Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

JOAQUIN LOPEZ MU?Z wrote:
I'm no C++ guru, but I understand the construct is legal according to DR45. What puzzles me is that Compaq C++ is seemingly the only compiler failing on this, when the DR45 was approved well after the standard (in 2001, I think.)
Yes, in strict ansi mode Compaq C++ doesn't implement DR45 resolution. (See also the thread "[test] missing friend declaration in class fixed_mapping?") There were quite a number of failures due to this and I was hoping I found all of them, but it seems you were faster than me on this one. As Dave has already said, adding a friend declaration is usually the best way to solve this, but I can't say if there are other compilers that will choke on the friend declaration. Markus
participants (5)
-
David Abrahams
-
JOAQUIN LOPEZ MU?Z
-
Joaquín Mª López Muñoz
-
Markus Schöpflin
-
Robert Ramey