Skip to content
Browse files

adding some missing remove_reference in make_stl_allocator and is_sim…

…ple_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
  • Loading branch information...
1 parent d50ff18 commit e1df34709ea1c5e0684d0be3e1828d02e11e4707 @juchem juchem committed with jdelong Jan 25, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 folly/StlAllocator.h
View
10 folly/StlAllocator.h
@@ -190,7 +190,7 @@ class is_simple_allocator {
typedef typename std::remove_const<
typename std::remove_reference<Allocator>::type
>::type allocator;
- typedef T value_type;
+ typedef typename std::remove_reference<T>::type value_type;
typedef value_type* pointer;
public:
@@ -201,10 +201,14 @@ class is_simple_allocator {
template <typename T, typename Allocator>
typename std::enable_if<
is_simple_allocator<T, Allocator>::value,
- folly::StlAllocator<typename std::remove_reference<Allocator>::type, T>
+ folly::StlAllocator<
+ typename std::remove_reference<Allocator>::type,
+ typename std::remove_reference<T>::type
+ >
>::type make_stl_allocator(Allocator&& allocator) {
return folly::StlAllocator<
- typename std::remove_reference<Allocator>::type, T
+ typename std::remove_reference<Allocator>::type,
+ typename std::remove_reference<T>::type
>(&allocator);
}

0 comments on commit e1df347

Please sign in to comment.
Something went wrong with that request. Please try again.