Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerb Sutter <herb.sutter@gmail.com>2022-09-01 02:48:13 +0300
committerGitHub <noreply@github.com>2022-09-01 02:48:13 +0300
commitd569ed65d05791fa6589115e1bfea879c8e9c591 (patch)
tree0c07845f5c8af0978419dc0223177a8be51138b6
parent352f73df925f037b24d3f34446fd272b4305a330 (diff)
Add `remove_cv` too per Casey's suggestion
Co-authored-by: Casey Carter <Casey@Carter.net>
-rw-r--r--include/gsl/util2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gsl/util b/include/gsl/util
index 4d2f5cf..8d3f381 100644
--- a/include/gsl/util
+++ b/include/gsl/util
@@ -74,7 +74,7 @@ private:
template <class F>
GSL_NODISCARD auto finally(F&& f) noexcept
{
- return final_action<std::remove_reference_t<F>>{std::forward<F>(f)};
+ return final_action<std::remove_cv_t<std::remove_reference_t<F>>>{std::forward<F>(f)};
}
// narrow_cast(): a searchable way to do narrowing casts of values