Hi Kenton / to whom it may concern!
I’m using capnproto and when I try to use the library I seem to be getting the
following errors from schema.capnp.h. They seem related to the “Which” enum
with -Wshadow -Werror.
In file included from
../../../../../../ext/capnproto/c++/src/capnp/dynamic.h:35:
In file included from ../../../../../../ext/capnproto/c++/src/capnp/schema.h:39:
../../../../../../ext/capnproto/c++/src/capnp/schema.capnp.h:488:5: error:
declaration shadows a static data member of 'capnp::schema::Type'
[-Werror,-Wshadow]
STRUCT,
^
../../../../../../ext/capnproto/c++/src/capnp/schema.capnp.h:379:5: note:
previous declaration is here
STRUCT,
^
../../../../../../ext/capnproto/c++/src/capnp/schema.capnp.h:489:5: error:
declaration shadows a static data member of 'capnp::schema::Type'
[-Werror,-Wshadow]
LIST,
^
../../../../../../ext/capnproto/c++/src/capnp/schema.capnp.h:377:5: note:
previous declaration is here
LIST,
^
I think this is because these “Which” enums are declared as “enum” and not
“enum class.” I think this may be unavoidable as long as I’m on the 0.8 release
version (unless I want to make local edits, which frankly I’m not excited to
do), so I may have to do -Wno-error=shadow. However, I was wondering if in
future versions it would be possible to fix this so that
Type::AnyPointer::Unconstrained::Which can be of type “enum class” instead of
just a pure “enum.” Would there be any problem with this? Am I misunderstanding
something? It seems like the project uses C++11/14 in a number of places
already, so this is probably not the biggest deal?
Cheers,
—
Jeremy Steward, M.Sc, E.I.T.
Senior Software Engineer
Technical Leader - Calibration
Occipital Inc.
+1 (303) 815-4240
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/capnproto/5D0D8A68-3EB3-4590-96D5-04065FE4E160%40occipital.com.