Chromium Code Reviews| Index: base/callback_internal.h |
| diff --git a/base/callback_internal.h b/base/callback_internal.h |
| index e4e538ff15c2d0dfe239bc5d8b17fe411c59926e..56bf58fecbc48eb038e9f5a0e6e8aa0cb180c958 100644 |
| --- a/base/callback_internal.h |
| +++ b/base/callback_internal.h |
| @@ -11,6 +11,7 @@ |
| #include <stddef.h> |
| #include <memory> |
| #include <type_traits> |
| +#include <vector> |
| #include "base/atomic_ref_count.h" |
| #include "base/base_export.h" |
| @@ -116,7 +117,13 @@ template <typename T> struct IsMoveOnlyType { |
| // Specialization of IsMoveOnlyType so that std::unique_ptr is still considered |
| // move-only, even without the sentinel member. |
| template <typename T, typename D> |
| -struct IsMoveOnlyType<std::unique_ptr<T, D>> : std::true_type {}; |
| +struct IsMoveOnlyType<std::unique_ptr<T, D>> : public std::true_type {}; |
|
danakj
2016/02/02 01:38:34
nit: let's leave out redundant public here and bel
dcheng
2016/02/02 01:52:11
Done.
|
| + |
| +// Specialization of std::vector, so that it's considered move-only if the |
| +// element type is move-only. |
|
danakj
2016/02/02 01:38:33
Leave a note that it ignores the Allocator?
dcheng
2016/02/02 01:52:11
Done.
|
| +template <typename T, typename Allocator> |
| +struct IsMoveOnlyType<std::vector<T, Allocator>> |
| + : public IsMoveOnlyType<typename std::vector<T, Allocator>::value_type> {}; |
|
danakj
2016/02/02 01:39:21
vlad's right though that this is the same as
: Is
dcheng
2016/02/02 01:52:11
OK, sure. I had imagined that we could use some ge
|
| template <typename> |
| struct CallbackParamTraitsForMoveOnlyType; |