We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Now that C++20 is widely available and support, we should consider updating Overload to take advantage of it. Some features we could use from C++20:
std::string::ends_with
std::string::starts_with
contains
std::map
std::set
consteval
derived_from
convertible_to
std::span
std::make_shared<int[]>(5)
std::bit_cast
PipelineState
erase_if
remove_if
erase
source_location::current()
__LINE__
__FILE__
std::bind_front
std::bind
std::placeholder::_1
std::lerp
OvMaths
... and more!
The text was updated successfully, but these errors were encountered:
After some investigation, it looks like C++20 introduces some regressions, notably this one: https://developercommunity.visualstudio.com/t/static-assert-failing-with-cppunittestassert-after/1643134
In our IniFile.inl we have:
IniFile.inl
if constexpr (...) { } else { static_assert(false, "..."); }
This doesn't compile with C++20 while it should.
This shouldn't prevent us from updating, as this issue could be mitigated, by using concepts for instance:
Concept declaration:
template<class T> concept IniType = std::is_same<bool, T>::value || std::is_same<std::string, T>::value || std::is_integral<T>::value || std::is_floating_point<T>::value;
Usage:
template<IniType T> T Get(const std::string& p_key); template<IniType T> T GetOrDefault(const std::string& p_key, T p_default); template<IniType T> bool Set(const std::string& p_key, const T& p_value); template<IniType T> bool Add(const std::string& p_key, const T& p_value);
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Now that C++20 is widely available and support, we should consider updating Overload to take advantage of it.
Some features we could use from C++20:
std::string::ends_with
andstd::string::starts_with
contains
std::map
andstd::set
in some places, and we could use this featureconsteval
derived_from
,convertible_to
...)std::span
std::make_shared<int[]>(5)
std::bit_cast
PipelineState
erase_if
remove_if
+erase
, it would simplify a bunch of our codesource_location::current()
__LINE__
and__FILE__
, to trace assert locationsstd::bind_front
std::bind
withstd::placeholder::_1
(shorter syntax)std::lerp
OvMaths
and might be better vectorized... and more!
The text was updated successfully, but these errors were encountered: