Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Compilation gets stuck with flag -Wshadow when using boost/operators

$
0
0

The following code can not be compiled with the Intel C++ compiler and flag -Wshadow. The compilation gets stuck without any further error message. However, the code compiles fine with the Intel C++ compiler when neglecting the flag -Wshadow.

#include <boost/operators.hpp>

class C
   : boost::ordered_euclidian_ring_operators1< C
   , boost::ordered_euclidian_ring_operators2< C, int
   , boost::ordered_euclidian_ring_operators2< C, double
> > > 
{
   C (long i) {}
};

int main() {}

I have tested  and reproduced this issue with versions 13.1.3, 14.0.3, 16.0.4, 17.0.5, 18.0.4 and 19.0.4 of the Intel C++ compiler using boost versions 1.61.0 and 1.70.0.
In contrast, the same code compiles fine with flag -Wshadow with various versions of the GNU C++ compiler and the LLVM Clang C++ compiler.


Viewing all articles
Browse latest Browse all 1175

Trending Articles