diff options
author | Mathias Stearn <redbeard0531@gmail.com> | 2022-03-29 08:19:09 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-29 09:40:31 +0000 |
commit | cb9550a01ec90a42108894ab1ed60a37f5238c89 (patch) | |
tree | b0244ab86e0022b7bad9edc0a19a1b60da7cc893 /src/mongo/stdx | |
parent | 80d15266187e5c83ab8202e8baa2774814cc91d2 (diff) | |
download | mongo-cb9550a01ec90a42108894ab1ed60a37f5238c89.tar.gz |
SERVER-63476 Add function_ref and stdx::remove_cvref_t
Diffstat (limited to 'src/mongo/stdx')
-rw-r--r-- | src/mongo/stdx/type_traits.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/stdx/type_traits.h b/src/mongo/stdx/type_traits.h index f7187877b2a..486c6bf14ac 100644 --- a/src/mongo/stdx/type_traits.h +++ b/src/mongo/stdx/type_traits.h @@ -53,6 +53,14 @@ struct type_identity { template <typename T> using type_identity_t = typename type_identity<T>::type; +template <class T> +struct remove_cvref { + using type = std::remove_cv_t<std::remove_reference_t<T>>; +}; + +template <typename T> +using remove_cvref_t = typename remove_cvref<T>::type; + } // namespace stdx } // namespace mongo |