My use of the enum class (VS2012):
class matrix {
public:
enum class operation_type {ADD, MULT};
matrix(operation_type op);
...
}
and in another fragment I use
matrix* m = new matrix(matrix::operation_type::ADD);
If the names are long, it gets very dirty.
Is it possible to somehow import the enumeration values so that I can write:
matrix* m = new matrix(ADD);
The same goes for nested classes - can I import them?
source
share