tags:

views:

180

answers:

1

Hi there, I've some problems with intel compiler 11.1.xxx Those problems doesn't appears during compilation with MS CL compiler. And I don't udnerstand what's wrong with the code (external boost library header) I end up with multiple errors:

..\boost/log/attributes/attribute_set.hpp(148): error: declaration is incompatible with constant "bool fConstV" (declared at line 147) template< bool fConstV > friend class iter; ^ detected during: instantiation of class "boost::log_mt::basic_attribute_set [with CharT=char]" at line 252 of "..\boost/log/sources/basic_logger.hpp" instantiation of class "boost::log_mt::sources::basic_logger [with CharT=char, FinalT=boost::log_mt::sources::logger, ThreadingModelT=boost::log_mt::sources::single_thread_model]" at line 738 of "..\boost/log/sources/basic_logger.hpp" instantiation of class "boost::log_mt::sources::basic_composite_logger [with CharT=char, FinalT=boost::log_mt::sources::logger, FeaturesT=boost::mpl::ve ctor0]" at line 787 of "..\boost/log/sources/basic_logger.hpp"

..\boost/log/attributes/named_scope.hpp(146): error: declaration is incompatible with constant "bool fConstV" (declared at line 145) template< bool fConstV > friend class iter; ^ detected during: instantiation of class "boost::log_mt::attributes::basic_named_scope_list [with CharT=char]" at line 364 instantiation of class "boost::log_mt::attributes::basic_named_scope [with CharT=char]" at line 94 of "..\boost/log/formatters/named_scope.hpp" instantiation of class "boost::log_mt::formatters::fmt_named_scope [with CharT=char]" at line 270 of "..\boost/log/formatters/named_scope.hpp"

attributeset.hpp

53)     template< typename CharT >
54)     class basic_attribute_set
55)     {
...
147)        template< bool fConstV > class iter;
148)        template< bool fConstV > friend class iter;
149)        template< bool fConstV >
150)
151)        class iter
152)        {
153)            friend class iter< !fConstV >;
154)            friend class basic_attribute_set< CharT >;
...
...

basiclogger.hpp

786)   class logger :
787)       public basic_composite_logger< char, logger, single_thread_model, mpl::vector0< > >
788)   {
789)       BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS(logger)
790)   };

Any hints welcome.

A: 

maybe at line 148 you want template <bool fConstV> friend class iter<fConstV>;? Though, as iter is declared as a nested class, I don't think you need the friend declaration;

Managu
template <bool fConstV> friend class iter<fConstV>;This doesn't work, for now only thing which is working is removing booth forward declarations.
bua