Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Compile error with preprocessed boost::fusion files

haim_mo
Beginner
275 Views

Hi,

I am working with Intel Compiler 9.1.038 and using a workflow that builds files in 2 steps:

1. Use the /P option in order topre-process the source file into a file.
2.Compiling the preprocessed file (result of #1).

I am compiling files that use boost::fusionand the workflow above is failing with the following compilation error:

error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

typedef map<:PAIR>< K0 , typename detail::as_fusion_element::type>> type;

Which basically means the compiler does not like nested template ends without separating spaces.

The weird thing, though, is that if instead of the workflow described above I simply compile the same exact file regularly - it succeeds.
Moreover, there were some warning messages I am getting with the 2 stage compilation that i'm not getting when I compile the file regularly.

I have narrowed down the issue to the following steps:

1. Create an Intel Compiler project through Visual Studio 2005.
2. Add Boost (in my case 1.34.1) to the additional include folders.
3. Add a new cpp file with the following code:

#include


#include
#include

void

myFunc()
{
}

Compile it regularly - and it passes.
Compile it with /P and then compile the preprocessed file and it fails.

Any idea as to what is causing this behavior and how to resolve it?

Thanks,
Moshe.

0 Kudos
1 Reply
JenniferJ
Moderator
275 Views

This isa known. A fix is being implemented right now.

It's because of "<<"& ">>" in th code.

0 Kudos
Reply