[Format] Errors resulting from optional.hpp

Hi all, Got a problem with using the format lib and I've no idea how to fix or get around this. I'm on an AIX using xlC ver 6. My other code using BGL compiled and ran fine so I'm assuming my library is built correctly. When I tried to compile using xlC, I get the errors listed below. The strange thing is that the same code does not generate errors in VS2005 or if I use g++ 4.11 on AIX. As indicated from the error below, line 389 in optional.hpp is: void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } What is this optional.hpp? From the name, it sounds like it's not required? Are there certain compiler options that boost requires? I have to use xlC because of compatibility issues so I've got to figure this out. Any help would be appreciated! Thanks! Error below: --------------------------------------------------------------------- IDTApplication.cpp: "/a/Boost/include/boost/optional/optional.hpp", line 389.66: 1540-0210 (S) "T" is not a base class of "locale". "/a/Boost/include/boost/optional/optional.hpp", line 389.10: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<std::locale>::destroy_impl(is_not _reference_tag)". "/a/Boost/include/boost/optional/optional.hpp", line 362.9: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<std::locale>::destroy()". "/a/Boost/include/boost/optional/optional.hpp", line 208.24: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<std::locale>::~optional_base()". "/a/Boost/include/boost/optional/optional.hpp", line 130.7: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<std::locale>::__dftbdt()". "/a/Boost/include/boost/optional/optional.hpp", line 472.5: 1540-0700 (I) The previous message was produced while processing "boost::optional<std::locale>::~optional()". "/a/Boost/include/boost/format/internals.hpp", line 38.9: 1540-0700 (I) The previous message was produced while processing "boost::io::detail::stream_format_state<char,std::char_traits<char>
::stream_format_state(char)".
"/a/Boost/include/boost/format/internals.hpp", line 78.53: 1540-0700 (I) The previous message was produced while processing "boost::io::detail::format_item<char,std::char_traits<char>,std::allocat or<char> >::format_item(char)". "/a/Boost/include/boost/format/format_implementation.hpp", line 121.40: 1540-0700 (I) The previous message was produced while processing "boost::basic_format<char,struct std::char_traits<char>,class std::allocator<char> >::make_or_reuse_data(size_t)". "/a/Boost/include/boost/format/parsing.hpp", line 415.9: 1540-0700 (I) The previous message was produced while processing "boost::basic_format<char,struct std::char_traits<char>,class std::allocator<char> >::parse(const string_type &)". "/a/Boost/include/boost/format/format_implementation.hpp", line 33.13: 1540-0700 (I) The previous message was produced while processing "boost::basic_format<char,struct std::char_traits<char>,class std::allocator<char> >::basic_format(const char *)". "IDTApplication.cpp", line 1082.17: 1540-0700 (I) The previous message was produced while processing "IDTApplication::createO(Pnt29aFile &, IDTConditionCodeFile &, string &, IDTDetails_File &)".

Hello Andrew, Due to the eastern holidays I just saw this today. boost::optional<> is used internally by the implementation of boost::format. Unfortunately, you discovered a bug in AIX's xlC ver 6. I don't have access to that compiler but you can help me figure out a workaround for it if you work with me. Can you try the following small program and see if it compiles? #include <locale> #include "boost/boost/optional.hpp" int main() { volatile boost::optional< std::locale > ol ; } TIA ------ Fernando Cacciola SciSoft http://certuscode.wordpress.com http://fcacciola.50webs.com http://fcacciola.wordpress.com
participants (2)
-
Fernando Cacciola
-
Ferng, Andrew D