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

Side by Side Diff: mojo/public/cpp/bindings/map_traits.h

Issue 2339413004: Allow Mojo structs as map keys (Closed)
Patch Set: Fix hash unit test on Windows Created 4 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/wtf_hash_util.h ('k') | mojo/public/cpp/bindings/map_traits_stl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_
7 7
8 namespace mojo { 8 namespace mojo {
9 9
10 // This must be specialized for any type |T| to be serialized/deserialized as 10 // This must be specialized for any type |T| to be serialized/deserialized as
(...skipping 19 matching lines...) Expand all
30 // static void AdvanceIterator(CustomConstIterator& iterator); 30 // static void AdvanceIterator(CustomConstIterator& iterator);
31 // static void AdvanceIterator(CustomIterator& iterator); 31 // static void AdvanceIterator(CustomIterator& iterator);
32 // 32 //
33 // static const K& GetKey(CustomIterator& iterator); 33 // static const K& GetKey(CustomIterator& iterator);
34 // static const K& GetKey(CustomConstIterator& iterator); 34 // static const K& GetKey(CustomConstIterator& iterator);
35 // 35 //
36 // static V& GetValue(CustomIterator& iterator); 36 // static V& GetValue(CustomIterator& iterator);
37 // static const V& GetValue(CustomConstIterator& iterator); 37 // static const V& GetValue(CustomConstIterator& iterator);
38 // 38 //
39 // // Returning false results in deserialization failure and causes the 39 // // Returning false results in deserialization failure and causes the
40 // // message pipe receiving it to be disconnected. 40 // // message pipe receiving it to be disconnected. |IK| and |IV| are
41 // // separate input key/value template parameters that allows for the
42 // // the key/value types to be forwarded.
43 // template <typename IK, typename IV>
41 // static bool Insert(CustomMap<K, V>& input, 44 // static bool Insert(CustomMap<K, V>& input,
42 // const K& key, 45 // IK&& key,
43 // V&& value); 46 // IV&& value);
44 // static bool Insert(CustomMap<K, V>& input,
45 // const K& key,
46 // const V& value);
47 // 47 //
48 // static void SetToEmpty(CustomMap<K, V>* output); 48 // static void SetToEmpty(CustomMap<K, V>* output);
49 // }; 49 // };
50 // 50 //
51 template <typename T> 51 template <typename T>
52 struct MapTraits; 52 struct MapTraits;
53 53
54 } // namespace mojo 54 } // namespace mojo
55 55
56 #endif // MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_ 56 #endif // MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/wtf_hash_util.h ('k') | mojo/public/cpp/bindings/map_traits_stl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698