OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace detail { | 44 namespace detail { |
45 // This is needed because the template parameters in Bind can't be resolved | 45 // This is needed because the template parameters in Bind can't be resolved |
46 // if they're used both as parameters of the function pointer type and as | 46 // if they're used both as parameters of the function pointer type and as |
47 // parameters to Bind itself: the function pointer parameters are exact | 47 // parameters to Bind itself: the function pointer parameters are exact |
48 // matches to the function prototype, but the parameters to bind have | 48 // matches to the function prototype, but the parameters to bind have |
49 // references stripped. This trick allows the compiler to dictate the Bind | 49 // references stripped. This trick allows the compiler to dictate the Bind |
50 // parameter types rather than deduce them. | 50 // parameter types rather than deduce them. |
51 template <class T> struct identity { typedef T type; }; | 51 template <class T> struct identity { typedef T type; }; |
52 } // namespace detail | 52 } // namespace detail |
53 | 53 |
54 $var n = 5 | 54 $var n = 6 |
55 $range i 0..n | 55 $range i 0..n |
56 $for i [[ | 56 $for i [[ |
57 $range j 1..i | 57 $range j 1..i |
58 | 58 |
59 template <class ObjectT, class MethodT, class R$for j [[, | 59 template <class ObjectT, class MethodT, class R$for j [[, |
60 class P$j]]> | 60 class P$j]]> |
61 class MethodFunctor$i { | 61 class MethodFunctor$i { |
62 public: | 62 public: |
63 MethodFunctor$i(MethodT method, ObjectT* object$for j [[, | 63 MethodFunctor$i(MethodT method, ObjectT* object$for j [[, |
64 P$j p$j]]) | 64 P$j p$j]]) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 #undef FP_T | 130 #undef FP_T |
131 | 131 |
132 ]] | 132 ]] |
133 | 133 |
134 } // namespace rtc | 134 } // namespace rtc |
135 | 135 |
136 #undef NONAME | 136 #undef NONAME |
137 | 137 |
138 #endif // WEBRTC_BASE_BIND_H_ | 138 #endif // WEBRTC_BASE_BIND_H_ |
OLD | NEW |