-
-
Notifications
You must be signed in to change notification settings - Fork 451
Support etl::underlying_type with compiler builtin #1045
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
Support etl::underlying_type with compiler builtin #1045
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.
Thanks! This is useful in some of my use cases.
The unit tests all fail for MSVC. |
You need to update |
de17a4f
to
14b1fe1
Compare
Modified
|
It fails because |
14b1fe1
to
81085cb
Compare
updated to exclude the A successful MSVC run in my fork |
81085cb
to
555d710
Compare
template <typename T> | ||
ETL_CONSTEXPR underlying_type_t<T> to_underlying(T val) ETL_NOEXCEPT | ||
{ | ||
return static_cast<underlying_type_t<T>>(val); | ||
} |
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.
Shouldn't this be in "utility.h"? cppreference notes that it is defined in <utility>
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.
Thanks for reminding.
Moved to_underlying<>
to include/etl/utility.h
.
msvc is unsupported currently
555d710
to
160cd80
Compare
This feature is already available in https://github.com/rolandreichweinbmw/etlplus |
No description provided.