asutton/clang

<algorithm> header fails to compile in injection-2 branch

Opened this issue · 0 comments

When compiling source containing the header, it fails with following error:

In file included from /usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/algorithm:62:
In file included from /usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/bits/stl_algo.h:66:
/usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/bits/uniform_int_dist.h:176:2: error: expected member name or ';' after declaration specifiers
        __generate(_ForwardIterator __f, _ForwardIterator __t,
        ^
/usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/bits/uniform_int_dist.h:286:7: error: out-of-line definition of '__generate_impl' does not match any declaration in 'uniform_int_distribution<_IntType>'
      __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
      ^~~~~~~~~~~~~~~

It looks like the header names one of it's functions __generate which is now a special token in the clang branch.