Commit f08234c4 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

Move remove_reference_wrapper to coro traits

Summary: [Folly] Move remove_reference_wrapper to coro traits, since this is not a language-level trait and is there to be used in the coro library.

Reviewed By: iahs

Differential Revision: D20301017

fbshipit-source-id: aa78488cc5138e6ade9dcbc99ec1b75b65c74c78
parent 30f1c257
......@@ -240,20 +240,6 @@ struct remove_cvref {
template <typename T>
using remove_cvref_t = typename remove_cvref<T>::type;
/**
* A type trait to unwrap a std::reference_wrapper<T> to a type T
*/
template <typename T>
struct remove_reference_wrapper {
using type = T;
};
template <typename T>
struct remove_reference_wrapper<std::reference_wrapper<T>> {
using type = T;
};
template <typename T>
using remove_reference_wrapper_t = typename remove_reference_wrapper<T>::type;
namespace detail {
template <typename Src>
struct like_ {
......
......@@ -24,6 +24,20 @@
namespace folly {
namespace coro {
/**
* A type trait to unwrap a std::reference_wrapper<T> to a type T
*/
template <typename T>
struct remove_reference_wrapper {
using type = T;
};
template <typename T>
struct remove_reference_wrapper<std::reference_wrapper<T>> {
using type = T;
};
template <typename T>
using remove_reference_wrapper_t = typename remove_reference_wrapper<T>::type;
namespace detail {
template <typename T>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment