|
|
Allow constructing {Interface,Struct}Ptr from nullptr
This allows spelling a null InterfacePtr or StructPtr parameter
'nullptr' instead of namespace::FooPtr(). To do so, this uses C++11
rvalue reference semantics for move support and adds constructor and
assignment operator overloads that take the type decltype(nullptr). We
still use a macro for move-only types to hide the copy and assignment
operators, add Pass(), and add the misleading named type tag
MoveOnlyForCPP03 for compatibility with Chromium's base/callback (and
anything else that may want to use it).
R=darin@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/e4389610d2f6e842ef79786c3100da363fd1b0a3
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+81 lines, -77 lines) |
Patch |
 |
M |
mojo/public/cpp/bindings/array.h
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/interface_ptr.h
|
View
|
|
1 chunk |
+11 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/interface_request.h
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/lib/filter_chain.h
|
View
|
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/lib/filter_chain.cc
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/map.h
|
View
|
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/struct_ptr.h
|
View
|
|
2 chunks |
+15 lines, -8 lines |
2 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/tests/container_test_util.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/tests/container_test_util.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -6 lines |
1 comment
|
Download
|
 |
M |
mojo/public/cpp/system/handle.h
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/system/macros.h
|
View
|
|
1 chunk |
+12 lines, -16 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/system/tests/macros_unittest.cc
|
View
|
|
2 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
Total messages: 8 (1 generated)
|