error 409 when building boost libraries 1.40.0 with Intel compiler

Problem :
When building boost libraries version 1.40.0 with Intel compiler 11.1.046, the compiler report error #409 like below:

./boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp(119): error #409: "boost::wave::cpplexer::re2clex::lexer<IteratorT, PositionT>::lexer(const IteratorT &, const IteratorT &, const PositionT &, boost::wave::language_support)" provides no initializer for:
const member "boost::wave::cpplexer::re2clex::lexer<IteratorT, PositionT>::cache"
{
^
detected during:
instantiation of "boost::wave::cpplexer::re2clex::lex_functor<IteratorT, PositionT>::lex_functor(const IteratorT &, const IteratorT &, const PositionT &, boost::wave::language_support) [with IteratorT=char *, PositionT=boost::wave::util::file_position_type]" at line 402
instantiation of "boost::wave::cpplexer::lex_input_interface *boost::wave::cpplexer::new_lexer_gen<IteratorT, PositionT>::new_lexer(const IteratorT &, const IteratorT &, const PositionT &, boost::wave::language_support) [with IteratorT=char *, PositionT=boost::wave::util::file_position_type]" at line 52 of "libs/wave/src/instantiate_re2c_lexer.cpp"

Environment :

Boost libraries version 1.40.0 for linux*
Intel C++ Compiler for linux, version 11.1.046

Root Cause :
Need initializer for const variable cache defined in file cpp_re2c_lexer.hpp, line 107. Refer this article /en-us/articles/cdiag409 for details.

Resolution :
This error no longer occurs with the Intel® C++ Compiler 11.1.059 for Linux*.  As a workaround as well, you can add an initializer for the const variable cache in file boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp. For example:

template <typename IteratorT, typename PositionT>
inline
lexer<IteratorT, PositionT>::lexer(IteratorT const &first, 
IteratorT const &last, PositionT const &pos, 
boost::wave::language_support language_) 
: filename(pos.get_file()), at_eof(false), language(language_),cache(token_cache< typename lexer < IteratorT, PositionT >::string_type >())
{
using namespace std; // some systems have memset in std
memset(&scanner, '', sizeof(Scanner));

 

For more complete information about compiler optimizations, see our Optimization Notice.