Boost compiler error: class has no member "type"

Reference number: DPD200325435

Product versions:

  • Intel® C++ Composer XE 2013 SP1 for Windows* or Linux*
  • Intel® C++ Composer XE 2013 for Windows* or Linux*

Problem description:

When compiling recent versions of the Boost library headers, the Intel® C++ Compiler XE 14.0 (part of Intel® C++ Composer XE 2013 SP1) may emit a compiler error like the following:

arithmetic_tests.cpp(31303): error: class "boost::proto::transform<PrimitiveTransform, X>::result<boost::phoenix::phoenix_generator (boost::proto::exprns_::expr<boost::proto::tagns_::tag::assign, boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::reference_wrapper<int>>, 0L>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::reference_wrapper<int>>, 0L>>>, 2L>)> [with PrimitiveTransform=boost::proto::switch_<boost::phoenix::phoenix_generator, boost::proto::tag_of<boost::proto::_> ()>, X=void]" has no member "type" 


This is a known issue. It has been worked on. This article will be updated when a fix is available.

A possible workaround is to remove the templated assignment operator that takes a const template argument in the class actor in the header file boost_1_5x_0\boost\phoenix\core\actor.hpp. This will only work if you are not actually calling this assignment operator. This change looks like the following:

/* Intel compiler cannot currently compile return type on assignment operator declared below */ 
        template <typename A0> 
        typename proto::result_of::make_expr< 
            A0>::type const 
        operator=(A0 const & a0) const 
            return proto::make_expr<proto::tag::assign, phoenix_domain>(this->proto_expr_, a0); 
For more complete information about compiler optimizations, see our Optimization Notice.