From e1df34709ea1c5e0684d0be3e1828d02e11e4707 Mon Sep 17 00:00:00 2001 From: Marcelo Juchem Date: Fri, 25 Jan 2013 17:22:57 -0800 Subject: [PATCH] adding some missing remove_reference in make_stl_allocator and is_simple_allocator Summary: adding some missing remove_reference in make_stl_allocator and is_simple_allocator Test Plan: unit tests Reviewed By: jon.coens@fb.com FB internal diff: D689524 --- folly/StlAllocator.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/folly/StlAllocator.h b/folly/StlAllocator.h index 629d8fec..1dd59248 100644 --- a/folly/StlAllocator.h +++ b/folly/StlAllocator.h @@ -190,7 +190,7 @@ class is_simple_allocator { typedef typename std::remove_const< typename std::remove_reference::type >::type allocator; - typedef T value_type; + typedef typename std::remove_reference::type value_type; typedef value_type* pointer; public: @@ -201,10 +201,14 @@ public: template typename std::enable_if< is_simple_allocator::value, - folly::StlAllocator::type, T> + folly::StlAllocator< + typename std::remove_reference::type, + typename std::remove_reference::type + > >::type make_stl_allocator(Allocator&& allocator) { return folly::StlAllocator< - typename std::remove_reference::type, T + typename std::remove_reference::type, + typename std::remove_reference::type >(&allocator); } -- 2.34.1