A quick follow up to this, it looks like in one of the post 2.1.1-dev releases
enum Flags { None=0, escape_strings=1, quote_single_string=2 };
was added to line 465 of typedesc.h which is defined in X11.h and leads to the
same errors.
#undef None fixes the issue.
Colin
> On Jun 27, 2019, at 3:02 PM, Larry Gritz <[email protected]> wrote:
>
> Since doing this would make the vector types' True() and False() methods
> unusable, I think that what I will do for now is just the initial #undef, and
> leave it in "simd.h mode" so to speak. If this comes up as an issue for
> somebody later, we can re-evaluate whether to do something at the end of
> simd.h to put things back.
>
>
>> On Jun 27, 2019, at 4:04 AM, Colin Doncaster <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> 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]
>>> <mailto:[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
>>>> <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
>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>>
>> _______________________________________________
>> 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