You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to compile a project which uses Pangolin, I got an error when compiling with GCC-11:
/usr/include/pangolin/utils/picojson.h:273:65: error: macro "_serialize" passed 2 arguments, but takes just 0
273 | template <typename Iter> void _serialize(Iter os, int indent) const;
...
...
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/serializeintrin.h:37: note: macro "_serialize" defined here
37 | #define _serialize() __builtin_ia32_serialize ()
|
In fact, GCC-11 defines a new macro _serialize, creating a conflict with the private member defined in pangolin/utils/picojson.h.
In general, I think it will be safer to name private members as something_ rather than _something since all names starting with an underscore are considered as reserved names in GCC
The text was updated successfully, but these errors were encountered:
I'm trying to compile a project which uses Pangolin, I got an error when compiling with GCC-11:
In fact, GCC-11 defines a new macro
_serialize
, creating a conflict with the private member defined inpangolin/utils/picojson.h
.In general, I think it will be safer to name private members as
something_
rather than_something
since all names starting with an underscore are considered as reserved names in GCCThe text was updated successfully, but these errors were encountered: