From: Marcelo Juchem Date: Sat, 26 Jan 2013 01:22:57 +0000 (-0800) Subject: adding some missing remove_reference in make_stl_allocator and is_simple_allocator X-Git-Tag: v0.22.0~1076 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1df34709ea1c5e0684d0be3e1828d02e11e4707;p=folly.git 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 --- 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); }