c++ 11 and above enum
- grammar
enum [identifier] [: type] {
...,
...,
};
- example
namespace costmap_2d {
/**
* @brief TALL_OBSTACLE for 3d nav
*/
enum: unsigned char {
TALL_OBSTACLE = 252,
};
}
- example 2
enum class A {
A = 3,
B = 10,
};
A somea = A::A;