Looks good to me. You had also mentioned in the comments about re-defining the macros at the end of the header. Although it’s non-standard C++ it seems like most compilers would allow the use of the push_macro/pop_macro pragma.
ie. #pragma push_macro(“True”) #undef True and then at the end of the header #pragma pop_marco(“True”) which maintains the correct values just in case there were differing opinions on True/False in the 1980’s. :) > On Jun 26, 2019, at 10:40 PM, Larry Gritz <[email protected]> wrote: > > How does this look? > > https://github.com/OpenImageIO/oiio/pull/2272 > <https://github.com/OpenImageIO/oiio/pull/2272> > > > >> On Jun 26, 2019, at 7:28 PM, Larry Gritz <[email protected] >> <mailto:[email protected]>> wrote: >> >> Ouch! >> >> The 1980's called, and they want their `#define True` back. >> >> I think I can rig up simd.h fix to make this work. Stay tuned, I will >> propose a PR shortly.. >> >> >> >>> On Jun 26, 2019, at 2:33 PM, Colin Doncaster <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> We came up against a (potentially very isolated) issue when using >>> OpenImageIO on Linux within a Maya plugin, at some point one of Maya’s >>> headers indirectly includes Xlib.h which does >>> >>> #define True 1 >>> #define False 0 >>> >>> and thus causes a lot of "expected unqualified-id before numeric constant" >>> errors in OIIO’s simd.h >>> >>> Although we could bury/hide some of the OIIO usage we decided to undef the >>> two macros as it doesn’t seem to break anything. >>> >>> Have others come across this and if so was there a more elegant solution? >>> >>> Colin >>> >>> >>> _______________________________________________ >>> Oiio-dev mailing list >>> [email protected] <mailto:[email protected]> >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> >> -- >> Larry Gritz >> [email protected] <mailto:[email protected]> >> >> >> >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] <mailto:[email protected]> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > -- > Larry Gritz > [email protected] <mailto:[email protected]> > > > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
