Open HerbertJordan opened 6 years ago
This might be related to the "fix" I commited recently (28bb03276d8053653a7d9e178a709f0a6fe3c0ac) along with the API commit https://github.com/allscale/allscale_api/commit/d006bb9d741b29687c8ec7e7584c7773dc2a398d
So my first try to fix this would be to include <random>
right at the top before including anything from the AllScale API, as a fast workaround. Maybe this will help.
After a quick glance at the source, the pic_tracer doesn't include <random>
at all, so it only gets that stuff via transitive includes, which are evil by design IMHO ;-)
The pic_tracer translation unit includes the cell.h
which in turns includes <random>
.
Since the pic_tracer.cxx
file is only referencing symbols defined in cell.h
, I think this is the clean way to handle this. The fact that cell.h
requires symbolc ins <random>
for its definitions is an implementation detail pic_tracer.cxx
should not be concerned with.
It is not the case that pic_tracer.cxx
is relying on <random>
to be included by cell.h
to access symbols defined in <random>
.
I fully agree with that.
But I still guess the reason for this problem is, that pic_tracer.cxx gets <random>
included transitively via some intercepted header - namely something in the AllScale API.
My assumption is, that moving the two AllScale API includes after the ipic3d includes might solve this problem here.
As can be observed when generating code for the pic_tracer example, the header include
<random>
is missing forBoth types are used in the generated code, in their qualified name. However, the corresponding include pragma is missing.