Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: mojo/public/cpp/bindings/map.h

Issue 1395533005: Use <type_traits> in the C++ bindings library wherever possible. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/template_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/map.h
diff --git a/mojo/public/cpp/bindings/map.h b/mojo/public/cpp/bindings/map.h
index 2846d631d8ed09b94d48caff4f8988dc97d93beb..64b6c3f2f0f08a4fa006d2740e93bcf88a324dff 100644
--- a/mojo/public/cpp/bindings/map.h
+++ b/mojo/public/cpp/bindings/map.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_MAP_H_
#include <map>
+#include <type_traits>
#include "mojo/public/cpp/bindings/lib/map_internal.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
@@ -178,16 +179,15 @@ class Map {
enum class IteratorMutability { kConst, kMutable };
template <IteratorMutability MutabilityType = IteratorMutability::kMutable>
class InternalIterator {
- using InternalIteratorType = typename internal::Conditional<
+ using InternalIteratorType = typename std::conditional<
MutabilityType == IteratorMutability::kConst,
typename std::map<KeyStorageType, ValueStorageType>::const_iterator,
typename std::map<KeyStorageType, ValueStorageType>::iterator>::type;
using ReturnValueType =
- typename internal::Conditional<MutabilityType ==
- IteratorMutability::kConst,
- ValueConstRefType,
- ValueRefType>::type;
+ typename std::conditional<MutabilityType == IteratorMutability::kConst,
+ ValueConstRefType,
+ ValueRefType>::type;
public:
InternalIterator() : it_() {}
« no previous file with comments | « mojo/public/cpp/bindings/lib/template_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698