Add BOUT_ENUM_CLASS_NS and switch bout::ConductionMethod to it - #3457
Conversation
A version of BOUT_ENUM_CLASS that can create namespaced enums
6954930 to
efd6a66
Compare
|
Might be better/simpler if we just stuck a namespace onto the existing // bring the Foo name into the current scope
using bout::Foo;
// type alias lets us put a deprecated attribute on it
using Foo [[deprecated("use bout::Foo")]] = bout::Foo; |
|
Probably the |
I think it might make sense to introduce the new namespaced enum first, and test it, before we do a lot of churn?
It should probably be unsigned, but I think clang-tidy is happy with this one. It was not happy with |
|
What needs testing? It's just putting the declaration into a namespace -- if it compiles, the existing tests should be sufficient? |
|
If the tests cover everything, than that is It is still a lot of churn, and I do not fancy doing it right now, especially if we deprecate the old version (which we should) and switch everywhere away from it (to avoid more warnings). |
|
For my understanding, what's the difference between this and just using rather than Edit: Ah I see: specializations of |
Use `toString` to convert an unhandled ConductionMethod into a string. Should be easier for a user to understand than an integer.
|
I mean, they probably should be in the |
BOUT_ENUM_CLASS_NSis a version ofBOUT_ENUM_CLASSthat can create namespaced enums