[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
scheib | 0411d8f7 | 2015-10-19 19:29:55 | [diff] [blame] | 5 | // This is a "No Compile Test" suite. |
| 6 | // http://dev.chromium.org/developers/testing/no-compile-tests |
| 7 | |
dcheng | 172b6ad | 2016-09-24 05:05:57 | [diff] [blame] | 8 | #include <utility> |
| 9 | |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 10 | #include "base/bind.h" |
avi | 9b6f4293 | 2015-12-26 22:15:14 | [diff] [blame] | 11 | #include "base/callback.h" |
| 12 | #include "base/macros.h" |
[email protected] | 7296f276 | 2011-11-21 19:23:44 | [diff] [blame] | 13 | #include "base/memory/ref_counted.h" |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 14 | |
| 15 | namespace base { |
| 16 | |
| 17 | // Do not put everything inside an anonymous namespace. If you do, many of the |
[email protected] | 5dd6bdf | 2014-02-21 16:24:13 | [diff] [blame] | 18 | // helper function declarations will generate unused definition warnings. |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 19 | |
| 20 | static const int kParentValue = 1; |
| 21 | static const int kChildValue = 2; |
| 22 | |
| 23 | class NoRef { |
| 24 | public: |
| 25 | void VoidMethod0() {} |
| 26 | void VoidConstMethod0() const {} |
| 27 | int IntMethod0() { return 1; } |
| 28 | }; |
| 29 | |
[email protected] | 7296f276 | 2011-11-21 19:23:44 | [diff] [blame] | 30 | class HasRef : public NoRef, public base::RefCounted<HasRef> { |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | class Parent { |
| 34 | public: |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 35 | void AddRef() const {} |
| 36 | void Release() const {} |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 37 | virtual void VirtualSet() { value = kParentValue; } |
| 38 | void NonVirtualSet() { value = kParentValue; } |
| 39 | int value; |
| 40 | }; |
| 41 | |
| 42 | class Child : public Parent { |
| 43 | public: |
| 44 | virtual void VirtualSet() { value = kChildValue; } |
| 45 | void NonVirtualSet() { value = kChildValue; } |
| 46 | }; |
| 47 | |
| 48 | class NoRefParent { |
| 49 | public: |
| 50 | virtual void VirtualSet() { value = kParentValue; } |
| 51 | void NonVirtualSet() { value = kParentValue; } |
| 52 | int value; |
| 53 | }; |
| 54 | |
| 55 | class NoRefChild : public NoRefParent { |
| 56 | virtual void VirtualSet() { value = kChildValue; } |
| 57 | void NonVirtualSet() { value = kChildValue; } |
| 58 | }; |
| 59 | |
| 60 | template <typename T> |
| 61 | T PolymorphicIdentity(T t) { |
| 62 | return t; |
| 63 | } |
| 64 | |
| 65 | int UnwrapParentRef(Parent& p) { |
| 66 | return p.value; |
| 67 | } |
| 68 | |
| 69 | template <typename T> |
| 70 | void VoidPolymorphic1(T t) { |
| 71 | } |
| 72 | |
Daniel Cheng | a09cb60 | 2017-08-30 13:46:19 | [diff] [blame] | 73 | void TakesMoveOnly(std::unique_ptr<int>) { |
| 74 | } |
| 75 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 76 | // TODO(hans): Remove .* and update the static_assert expectations once we roll |
| 77 | // past Clang r313315. https://crbug.com/765692. |
| 78 | |
| 79 | #if defined(NCTEST_METHOD_ON_CONST_OBJECT) // [r"fatal error: static_assert failed .*\"Bound argument \|i\| of type \|Arg\| cannot be forwarded as \|Unwrapped\| to the bound functor, which declares it as \|Param\|\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 80 | |
| 81 | // Method bound to const-object. |
| 82 | // |
| 83 | // Only const methods should be allowed to work with const objects. |
| 84 | void WontCompile() { |
| 85 | HasRef has_ref; |
| 86 | const HasRef* const_has_ref_ptr_ = &has_ref; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 87 | Callback<void()> method_to_const_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 88 | Bind(&HasRef::VoidMethod0, const_has_ref_ptr_); |
| 89 | method_to_const_cb.Run(); |
| 90 | } |
| 91 | |
dcheng | b760d72 | 2014-11-03 21:29:30 | [diff] [blame] | 92 | #elif defined(NCTEST_METHOD_BIND_NEEDS_REFCOUNTED_OBJECT) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 93 | |
| 94 | // Method bound to non-refcounted object. |
| 95 | // |
| 96 | // We require refcounts unless you have Unretained(). |
| 97 | void WontCompile() { |
| 98 | NoRef no_ref; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 99 | Callback<void()> no_ref_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 100 | Bind(&NoRef::VoidMethod0, &no_ref); |
| 101 | no_ref_cb.Run(); |
| 102 | } |
| 103 | |
dcheng | b760d72 | 2014-11-03 21:29:30 | [diff] [blame] | 104 | #elif defined(NCTEST_CONST_METHOD_NEEDS_REFCOUNTED_OBJECT) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 105 | |
| 106 | // Const Method bound to non-refcounted object. |
| 107 | // |
| 108 | // We require refcounts unless you have Unretained(). |
| 109 | void WontCompile() { |
| 110 | NoRef no_ref; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 111 | Callback<void()> no_ref_const_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 112 | Bind(&NoRef::VoidConstMethod0, &no_ref); |
| 113 | no_ref_const_cb.Run(); |
| 114 | } |
| 115 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 116 | #elif defined(NCTEST_CONST_POINTER) // [r"fatal error: static_assert failed .*\"Bound argument \|i\| of type \|Arg\| cannot be forwarded as \|Unwrapped\| to the bound functor, which declares it as \|Param\|\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 117 | |
| 118 | // Const argument used with non-const pointer parameter of same type. |
| 119 | // |
| 120 | // This is just a const-correctness check. |
| 121 | void WontCompile() { |
| 122 | const NoRef* const_no_ref_ptr; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 123 | Callback<NoRef*()> pointer_same_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 124 | Bind(&PolymorphicIdentity<NoRef*>, const_no_ref_ptr); |
| 125 | pointer_same_cb.Run(); |
| 126 | } |
| 127 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 128 | #elif defined(NCTEST_CONST_POINTER_SUBTYPE) // [r"fatal error: static_assert failed .*\"Bound argument \|i\| of type \|Arg\| cannot be forwarded as \|Unwrapped\| to the bound functor, which declares it as \|Param\|\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 129 | |
| 130 | // Const argument used with non-const pointer parameter of super type. |
| 131 | // |
| 132 | // This is just a const-correctness check. |
| 133 | void WontCompile() { |
| 134 | const NoRefChild* const_child_ptr; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 135 | Callback<NoRefParent*()> pointer_super_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 136 | Bind(&PolymorphicIdentity<NoRefParent*>, const_child_ptr); |
| 137 | pointer_super_cb.Run(); |
| 138 | } |
| 139 | |
dcheng | b760d72 | 2014-11-03 21:29:30 | [diff] [blame] | 140 | #elif defined(DISABLED_NCTEST_DISALLOW_NON_CONST_REF_PARAM) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"] |
| 141 | // TODO(dcheng): I think there's a type safety promotion issue here where we can |
| 142 | // pass a const ref to a non const-ref function, or vice versa accidentally. Or |
| 143 | // we make a copy accidentally. Check. |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 144 | |
| 145 | // Functions with reference parameters, unsupported. |
| 146 | // |
| 147 | // First, non-const reference parameters are disallowed by the Google |
| 148 | // style guide. Second, since we are doing argument forwarding it becomes |
| 149 | // very tricky to avoid copies, maintain const correctness, and not |
| 150 | // accidentally have the function be modifying a temporary, or a copy. |
| 151 | void WontCompile() { |
| 152 | Parent p; |
| 153 | Callback<int(Parent&)> ref_arg_cb = Bind(&UnwrapParentRef); |
| 154 | ref_arg_cb.Run(p); |
| 155 | } |
| 156 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 157 | #elif defined(NCTEST_DISALLOW_BIND_TO_NON_CONST_REF_PARAM) // [r"fatal error: static_assert failed .*\"Bound argument \|i\| of type \|Arg\| cannot be forwarded as \|Unwrapped\| to the bound functor, which declares it as \|Param\|\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 158 | |
| 159 | // Binding functions with reference parameters, unsupported. |
| 160 | // |
| 161 | // See comment in NCTEST_DISALLOW_NON_CONST_REF_PARAM |
| 162 | void WontCompile() { |
| 163 | Parent p; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 164 | Callback<int()> ref_cb = Bind(&UnwrapParentRef, p); |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 165 | ref_cb.Run(); |
| 166 | } |
| 167 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 168 | #elif defined(NCTEST_NO_IMPLICIT_ARRAY_PTR_CONVERSION) // [r"fatal error: static_assert failed .*\"First bound argument to a method cannot be an array\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 169 | |
| 170 | // A method should not be bindable with an array of objects. |
| 171 | // |
| 172 | // This is likely not wanted behavior. We specifically check for it though |
| 173 | // because it is possible, depending on how you implement prebinding, to |
| 174 | // implicitly convert an array type to a pointer type. |
| 175 | void WontCompile() { |
| 176 | HasRef p[10]; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 177 | Callback<void()> method_bound_to_array_cb = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 178 | Bind(&HasRef::VoidMethod0, p); |
| 179 | method_bound_to_array_cb.Run(); |
| 180 | } |
| 181 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 182 | #elif defined(NCTEST_NO_RVALUE_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"fatal error: static_assert failed .*\"A parameter is a refcounted type and needs scoped_refptr\.\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 183 | |
| 184 | // Refcounted types should not be bound as a raw pointer. |
| 185 | void WontCompile() { |
| 186 | HasRef for_raw_ptr; |
[email protected] | 7296f276 | 2011-11-21 19:23:44 | [diff] [blame] | 187 | int a; |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 188 | Callback<void()> ref_count_as_raw_ptr_a = |
[email protected] | 7296f276 | 2011-11-21 19:23:44 | [diff] [blame] | 189 | Bind(&VoidPolymorphic1<int*>, &a); |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 190 | Callback<void()> ref_count_as_raw_ptr = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 191 | Bind(&VoidPolymorphic1<HasRef*>, &for_raw_ptr); |
| 192 | } |
| 193 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 194 | #elif defined(NCTEST_NO_LVALUE_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"fatal error: static_assert failed .*\"A parameter is a refcounted type and needs scoped_refptr\.\""] |
tzik | 1d692a2e | 2017-07-03 11:01:26 | [diff] [blame] | 195 | |
| 196 | // Refcounted types should not be bound as a raw pointer. |
| 197 | void WontCompile() { |
| 198 | HasRef* for_raw_ptr = nullptr; |
| 199 | Callback<void()> ref_count_as_raw_ptr = |
| 200 | Bind(&VoidPolymorphic1<HasRef*>, for_raw_ptr); |
| 201 | } |
| 202 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 203 | #elif defined(NCTEST_NO_RVALUE_CONST_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"fatal error: static_assert failed .*\"A parameter is a refcounted type and needs scoped_refptr\.\""] |
tzik | f41b933 | 2017-07-10 09:13:33 | [diff] [blame] | 204 | |
| 205 | // Refcounted types should not be bound as a raw pointer. |
| 206 | void WontCompile() { |
| 207 | const HasRef for_raw_ptr; |
| 208 | Callback<void()> ref_count_as_raw_ptr = |
| 209 | Bind(&VoidPolymorphic1<const HasRef*>, &for_raw_ptr); |
| 210 | } |
| 211 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 212 | #elif defined(NCTEST_NO_LVALUE_CONST_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"fatal error: static_assert failed .*\"A parameter is a refcounted type and needs scoped_refptr\.\""] |
tzik | f41b933 | 2017-07-10 09:13:33 | [diff] [blame] | 213 | |
| 214 | // Refcounted types should not be bound as a raw pointer. |
| 215 | void WontCompile() { |
| 216 | const HasRef* for_raw_ptr = nullptr; |
| 217 | Callback<void()> ref_count_as_raw_ptr = |
| 218 | Bind(&VoidPolymorphic1<const HasRef*>, for_raw_ptr); |
| 219 | } |
| 220 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 221 | #elif defined(NCTEST_WEAKPTR_BIND_MUST_RETURN_VOID) // [r"fatal error: static_assert failed .*\"weak_ptrs can only bind to methods without return values\""] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 222 | |
| 223 | // WeakPtrs cannot be bound to methods with return types. |
| 224 | void WontCompile() { |
| 225 | NoRef no_ref; |
| 226 | WeakPtrFactory<NoRef> weak_factory(&no_ref); |
tzik | 3bc7779b | 2015-12-19 09:18:46 | [diff] [blame] | 227 | Callback<int()> weak_ptr_with_non_void_return_type = |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 228 | Bind(&NoRef::IntMethod0, weak_factory.GetWeakPtr()); |
| 229 | weak_ptr_with_non_void_return_type.Run(); |
| 230 | } |
| 231 | |
tzik | daa4f5a | 2016-02-12 13:54:37 | [diff] [blame] | 232 | #elif defined(NCTEST_DISALLOW_ASSIGN_DIFFERENT_TYPES) // [r"fatal error: no viable conversion from 'Callback<MakeUnboundRunType<void \(\*\)\(int\)>>' to 'Callback<void \(\)>'"] |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 233 | |
| 234 | // Bind result cannot be assigned to Callbacks with a mismatching type. |
| 235 | void WontCompile() { |
| 236 | Closure callback_mismatches_bind_type = Bind(&VoidPolymorphic1<int>); |
| 237 | } |
| 238 | |
wychen | 58b75f59 | 2016-12-23 07:08:44 | [diff] [blame] | 239 | #elif defined(NCTEST_DISALLOW_CAPTURING_LAMBDA) // [r"fatal error: implicit instantiation of undefined template 'base::internal::FunctorTraits<\(lambda at (\.\./)+base/bind_unittest.nc:[0-9]+:[0-9]+\), void>'"] |
tzik | c1db7265 | 2016-07-08 09:42:38 | [diff] [blame] | 240 | |
| 241 | void WontCompile() { |
wychen | 7525a84 | 2017-02-25 00:14:32 | [diff] [blame] | 242 | int i = 0, j = 0; |
| 243 | Bind([i,&j]() {j = i;}); |
tzik | c1db7265 | 2016-07-08 09:42:38 | [diff] [blame] | 244 | } |
| 245 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 246 | #elif defined(NCTEST_DISALLOW_ONCECALLBACK_RUN_ON_LVALUE) // [r"static_assert failed .*\"OnceCallback::Run\(\) may only be invoked on a non-const rvalue, i\.e\. std::move\(callback\)\.Run\(\)\.\""] |
dcheng | 77172b9 | 2016-11-22 07:46:06 | [diff] [blame] | 247 | |
| 248 | void WontCompile() { |
| 249 | OnceClosure cb = Bind([] {}); |
| 250 | cb.Run(); |
| 251 | } |
| 252 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 253 | #elif defined(NCTEST_DISALLOW_ONCECALLBACK_RUN_ON_CONST_LVALUE) // [r"static_assert failed .*\"OnceCallback::Run\(\) may only be invoked on a non-const rvalue, i\.e\. std::move\(callback\)\.Run\(\)\.\""] |
dcheng | 3f2fd66e | 2016-12-20 23:56:59 | [diff] [blame] | 254 | |
| 255 | void WontCompile() { |
| 256 | const OnceClosure cb = Bind([] {}); |
| 257 | cb.Run(); |
| 258 | } |
| 259 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 260 | #elif defined(NCTEST_DISALLOW_ONCECALLBACK_RUN_ON_CONST_RVALUE) // [r"static_assert failed .*\"OnceCallback::Run\(\) may only be invoked on a non-const rvalue, i\.e\. std::move\(callback\)\.Run\(\)\.\""] |
dcheng | 3f2fd66e | 2016-12-20 23:56:59 | [diff] [blame] | 261 | |
| 262 | void WontCompile() { |
| 263 | const OnceClosure cb = Bind([] {}); |
| 264 | std::move(cb).Run(); |
| 265 | } |
| 266 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 267 | #elif defined(NCTEST_DISALLOW_BIND_ONCECALLBACK) // [r"fatal error: static_assert failed .*\"BindRepeating cannot bind OnceCallback. Use BindOnce with std::move\(\)\.\""] |
tzik | ae4202e | 2017-07-31 10:41:54 | [diff] [blame] | 268 | |
| 269 | void WontCompile() { |
| 270 | Bind(BindOnce([](int) {}), 42); |
| 271 | } |
| 272 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 273 | #elif defined(NCTEST_DISALLOW_BINDONCE_LVALUE_ONCECALLBACK) // [r"fatal error: static_assert failed .*\"BindOnce requires non-const rvalue for OnceCallback binding\."] |
tzik | ae4202e | 2017-07-31 10:41:54 | [diff] [blame] | 274 | void WontCompile() { |
| 275 | auto cb = BindOnce([](int) {}); |
| 276 | BindOnce(cb, 42); |
| 277 | } |
| 278 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 279 | #elif defined(NCTEST_DISALLOW_BINDONCE_RVALUE_CONST_ONCECALLBACK) // [r"fatal error: static_assert failed .*\"BindOnce requires non-const rvalue for OnceCallback binding\."] |
tzik | ae4202e | 2017-07-31 10:41:54 | [diff] [blame] | 280 | |
| 281 | void WontCompile() { |
| 282 | const auto cb = BindOnce([](int) {}); |
| 283 | BindOnce(std::move(cb), 42); |
| 284 | } |
| 285 | |
Hans Wennborg | 8023548 | 2017-09-15 18:34:51 | [diff] [blame] | 286 | #elif defined(NCTEST_BINDONCE_MOVEONLY_TYPE_BY_VALUE) // [r"fatal error: static_assert failed .*\"Bound argument \|i\| is move-only but will be bound by copy\. Ensure \|Arg\| is mutable and bound using std::move\(\)\.\""] |
Daniel Cheng | a09cb60 | 2017-08-30 13:46:19 | [diff] [blame] | 287 | |
| 288 | void WontCompile() { |
| 289 | std::unique_ptr<int> x; |
| 290 | BindOnce(&TakesMoveOnly, x); |
| 291 | } |
| 292 | |
| 293 | #elif defined(NCTEST_BIND_MOVEONLY_TYPE_BY_VALUE) // [r"Bound argument \|i\| is move-only but will be forwarded by copy\. Ensure \|Arg\| is bound using base::Passed\(\), not std::move\(\)."] |
| 294 | |
| 295 | void WontCompile() { |
| 296 | std::unique_ptr<int> x; |
| 297 | Bind(&TakesMoveOnly, x); |
| 298 | } |
| 299 | |
| 300 | #elif defined(NCTEST_BIND_MOVEONLY_TYPE_WITH_STDMOVE) // [r"Bound argument \|i\| is move-only but will be forwarded by copy\. Ensure \|Arg\| is bound using base::Passed\(\), not std::move\(\)."] |
| 301 | |
| 302 | void WontCompile() { |
| 303 | std::unique_ptr<int> x; |
| 304 | Bind(&TakesMoveOnly, std::move(x)); |
| 305 | } |
| 306 | |
| 307 | |
[email protected] | 81814bce | 2011-09-10 03:03:00 | [diff] [blame] | 308 | #endif |
| 309 | |
| 310 | } // namespace base |