Commit 2f5439e4 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Simplify IsUniquePtrToSL in IOBuf.h

Summary: [Folly] Simplify `IsUniquePtrToSL` in `IOBuf.h`.

Reviewed By: Orvid

Differential Revision: D6131231

fbshipit-source-id: b054ef7ef9f313943a3ac1022ca6a23874a464df
parent 37335efb
...@@ -211,13 +211,10 @@ namespace folly { ...@@ -211,13 +211,10 @@ namespace folly {
*/ */
namespace detail { namespace detail {
// Is T a unique_ptr<> to a standard-layout type? // Is T a unique_ptr<> to a standard-layout type?
template <class T, class Enable=void> struct IsUniquePtrToSL template <typename T>
: public std::false_type { }; struct IsUniquePtrToSL : std::false_type {};
template <class T, class D> template <typename T, typename D>
struct IsUniquePtrToSL< struct IsUniquePtrToSL<std::unique_ptr<T, D>> : std::is_standard_layout<T> {};
std::unique_ptr<T, D>,
typename std::enable_if<std::is_standard_layout<T>::value>::type>
: public std::true_type { };
} // namespace detail } // namespace detail
class IOBuf { class IOBuf {
......
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