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

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

Issue 1558333002: Rectify our use of std::nullptr_t, inclusions of <stddef.h>/<cstddef>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 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/icu/constants.h ('k') | mojo/public/cpp/bindings/interface_ptr.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ARRAY_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ARRAY_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_H_
7 7
8 #include <stddef.h>
8 #include <string.h> 9 #include <string.h>
9 10
10 #include <algorithm> 11 #include <algorithm>
11 #include <cstddef> 12 #include <cstddef>
12 #include <set> 13 #include <set>
13 #include <string> 14 #include <string>
14 #include <vector> 15 #include <vector>
15 16
16 #include "mojo/public/cpp/bindings/lib/array_internal.h" 17 #include "mojo/public/cpp/bindings/lib/array_internal.h"
17 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
(...skipping 13 matching lines...) Expand all
31 using Traits = internal::ArrayTraits<T, internal::IsMoveOnlyType<T>::value>; 32 using Traits = internal::ArrayTraits<T, internal::IsMoveOnlyType<T>::value>;
32 using ForwardType = typename Traits::ForwardType; 33 using ForwardType = typename Traits::ForwardType;
33 34
34 typedef internal::Array_Data<typename internal::WrapperTraits<T>::DataType> 35 typedef internal::Array_Data<typename internal::WrapperTraits<T>::DataType>
35 Data_; 36 Data_;
36 37
37 // Constructs a new array that is null. 38 // Constructs a new array that is null.
38 Array() : is_null_(true) {} 39 Array() : is_null_(true) {}
39 40
40 // Makes null arrays implicitly constructible from |nullptr|. 41 // Makes null arrays implicitly constructible from |nullptr|.
41 Array(decltype(nullptr)) : is_null_(true) {} 42 Array(std::nullptr_t) : is_null_(true) {}
42 43
43 ~Array() {} 44 ~Array() {}
44 45
45 // Moves the contents of |other| into this array. 46 // Moves the contents of |other| into this array.
46 Array(Array&& other) : is_null_(true) { Take(&other); } 47 Array(Array&& other) : is_null_(true) { Take(&other); }
47 Array& operator=(Array&& other) { 48 Array& operator=(Array&& other) {
48 Take(&other); 49 Take(&other);
49 return *this; 50 return *this;
50 } 51 }
51 52
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 for (size_t i = 0; i < input.size(); ++i) 306 for (size_t i = 0; i < input.size(); ++i)
306 result.insert(TypeConverter<E, T>::Convert(input[i])); 307 result.insert(TypeConverter<E, T>::Convert(input[i]));
307 } 308 }
308 return result; 309 return result;
309 } 310 }
310 }; 311 };
311 312
312 } // namespace mojo 313 } // namespace mojo
313 314
314 #endif // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_H_ 315 #endif // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_H_
OLDNEW
« no previous file with comments | « mojo/icu/constants.h ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698