[Cs3] importing scoped enum names
Mikhail Nesterenko
mikhail at cs.kent.edu
Wed Apr 6 21:38:08 EDT 2022
CS3 students,
Last time in class I was saying that scoped enum constants are somewhat
verbose since they have to always be preceded by their enum type:
Week::Monday Week::Tuesday, etc
and was wondering if it was possible to import the constants into the
current scope. It turns out it is possible only in C++20 as follows:
using Week;
Thanks,
--
Mikhail
More information about the cs3
mailing list