-
Notifications
You must be signed in to change notification settings - Fork 37
change all enum to enum class
#759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
change all enum to enum class
#759
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
| constexpr explicit operator bool() const { return underlying(t); } | ||
| }; | ||
|
|
||
| template <typename T> using Underlying = std::underlying_type_t<T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::underlying_type_t" is directly included [misc-include-cleaner]
include/CppInterOp/CppInterOp.h:22:
- #include <vector>
+ #include <type_traits>
+ #include <vector>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #759 +/- ##
==========================================
+ Coverage 79.04% 79.08% +0.04%
==========================================
Files 9 9
Lines 3879 3888 +9
==========================================
+ Hits 3066 3075 +9
Misses 813 813
🚀 New features to boost your workflow:
|
|
|
||
| constexpr TruthValue<OperatorArity> operator&(OperatorArity l, | ||
| OperatorArity r) { | ||
| return OperatorArity(underlying(l) & underlying(r)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think arity could be xor-ed -- we have already kBoth.
| using TCppObject_t = void*; | ||
|
|
||
| enum Operator : unsigned char { | ||
| template <typename T> struct TruthValue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we can forward declare the operators and implement them in the cpp file and then we could hide this class completely from the interface.
No description provided.