English 中文(简体)
英特尔公司汇编者没有将私人前期申报汇编成另一类。
原标题:Intel compiler does not compile private forward class declaration in another class
  • 时间:2009-09-18 11:17:20
  •  标签:

I m having some problems with Intel compiler 11.1.xxx Those problems don t appear 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:

..oost/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 "..oost/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 "..oost/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 "..oost/log/sources/basic_logger.hpp"

..oost/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 "..oost/log/formatters/named_scope.hpp" instantiation of class "boost::log_mt::formatters::fmt_named_scope [with CharT=char]" at line 270 of "..oost/log/formatters/named_scope.hpp"

属性。

    template< typename CharT >
    class basic_attribute_set
    {
        /* ... */
        template< bool fConstV > class iter;
        template< bool fConstV > friend class iter;
        template< bool fConstV >

       class iter
       {
            friend class iter< !fConstV >;
            friend class basic_attribute_set< CharT >;
            /* ... */
            /* ... */
       }
    }

Basiclogger.hpp

   class logger : public basic_composite_logger< char, logger, single_thread_model, mpl::vector0< > >
   {
       BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS(logger)
   };

任何方面都表示欢迎。

问题回答

可能在第148条行中,你想要<条码>template <bool fConstV>朋友同异构体和带;fConstV>? 虽然作为<条码>ter被宣布为一种宽松的类别,但我认为你不需要朋友声明;





相关问题
热门标签