yarp icon indicating copy to clipboard operation
yarp copied to clipboard

Use enum class instead of enum

Open Nicogene opened this issue 6 years ago • 2 comments

Replace enum with enum class in Image and PointCloud. This will cause the enforcing on the type, but it will break the API.

Nicogene avatar Jun 19 '18 08:06 Nicogene

Beware of this issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43407 occurring in OLD gcc compilers (e.g. 5.4) installed on Ubuntu 16.04 Fixed in NEW gcc in Ubuntu 18.04.

randaz81 avatar Oct 01 '18 13:10 randaz81

We already have a YARP_DISABLE_CLASS_ENUM_API_WARNING macro to disable the warning when needed, and enum classes are already used in some places, see for example https://github.com/robotology/yarp/blob/f5e903f58cd4550504d6f6643e0bb3f91ece2ffe/src/libYARP_dev/include/yarp/dev/PidEnums.h#L27-L44

drdanz avatar Oct 10 '18 09:10 drdanz