-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use of deprecated C++ features #8
Comments
This is cool indeed, but I share s9w's concern about using the deprecated constructs. I've just added this to my project, and realizes that without a fix to this I'll be locked in to C++17. |
dangelog
added a commit
to dangelog/strong_typedef
that referenced
this issue
Dec 29, 2021
The type trait has been deprecated in C++17 and removed in C++20 because it offers no help in generic programming. Its usage is not needed in strong_typedef, where it was used to SFINAE out specializations that were otherwise identical to the primary template, except that they declared constexpr functions instead of non-constexpr. But this is unnecessary: a function template can always be marked as constexpr, the compiler will simply "ignore" it [1] if a given instantation cannot actually be constexpr. Hence just leave the constexpr code, drop the specializations and the related SFINAE. [1] https://eel.is/c++draft/dcl.constexpr#7.sentence-1 Fixes anthonywilliams#8
Thanks @dangelog for the fix! @anthonywilliams could you review #11? Thanks. |
monwarez
pushed a commit
to monwarez/strong_typedef
that referenced
this issue
Apr 1, 2022
The type trait has been deprecated in C++17 and removed in C++20 because it offers no help in generic programming. Its usage is not needed in strong_typedef, where it was used to SFINAE out specializations that were otherwise identical to the primary template, except that they declared constexpr functions instead of non-constexpr. But this is unnecessary: a function template can always be marked as constexpr, the compiler will simply "ignore" it [1] if a given instantation cannot actually be constexpr. Hence just leave the constexpr code, drop the specializations and the related SFINAE. [1] https://eel.is/c++draft/dcl.constexpr#7.sentence-1 Fixes anthonywilliams#8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi - this is pretty cool! But it uses
std::is_literal_type
, which is deprecated in C++17 and removed in C++20 - which makes this unusable in the majority of codebases I would assume. Any plan to address this?The text was updated successfully, but these errors were encountered: