<div dir="ltr"><div>Yeah, I didn't know about this pragma directive at all. A simple summary about it is here (including disclaimers on use).</div><div><br></div><div><a href="https://stackoverflow.com/questions/10261382/why-would-one-use-include-next-in-a-project">https://stackoverflow.com/questions/10261382/why-would-one-use-include-next-in-a-project</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2024 at 1:20 PM Greg Troxel via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Scott via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> writes:<br>
<br>
> #include_next is part of the c++ version 12. You can find it's usage<br>
>  here on debian 12:<br>
><br>
> /usr/include/c++/12/cstdlib, line 75<br>
<br>
I think that's gcc 12, not C++12 which is not a thing :-)<br>
<br>
It being used in an internal header supplied by the compiler is one<br>
thing.  I do not understand how an include of stdlib in a user program<br>
can do that sensibly.  It's supposed to mean that only things in the<br>
include path after this file that was found, are to be searched.<br>
That's very tricky and requires assumptions/checks about the include<br>
order, and cmake does not seem to guarantee a lot in that department.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>