27
27
28
28
#include < bsoncxx/config/prelude.hpp>
29
29
30
+ namespace bsoncxx {
31
+ namespace detail {
32
+
33
+ template <typename T>
34
+ using is_bson_view_compatible =
35
+ detail::conjunction<std::is_constructible<bsoncxx::v_noabi::types::bson_value::view, T>,
36
+ detail::negation<detail::disjunction<
37
+ detail::is_alike<T, bsoncxx::v_noabi::types::bson_value::view>,
38
+ detail::is_alike<T, bsoncxx::v_noabi::types::bson_value::value>>>>;
39
+
40
+ } // namespace detail
41
+ } // namespace bsoncxx
42
+
30
43
namespace bsoncxx {
31
44
namespace v_noabi {
32
45
namespace types {
@@ -303,15 +316,6 @@ class view {
303
316
};
304
317
};
305
318
306
- template <typename T>
307
- using is_bson_view_compatible = detail::conjunction<
308
- std::is_constructible<bson_value::view, T>,
309
- detail::negation<detail::disjunction<detail::is_alike<T, bson_value::view>,
310
- detail::is_alike<T, bson_value::value>>>>;
311
-
312
- template <typename T>
313
- using not_view = is_bson_view_compatible<T>;
314
-
315
319
// /
316
320
// / Compares a view with a type representable as a view.
317
321
// /
@@ -322,28 +326,28 @@ using not_view = is_bson_view_compatible<T>;
322
326
323
327
// / @relatesalso bsoncxx::v_noabi::types::bson_value::view
324
328
template <typename T>
325
- detail::requires_t <bool , is_bson_view_compatible<T>> //
329
+ detail::requires_t <bool , detail:: is_bson_view_compatible<T>> //
326
330
operator ==(const bson_value::view& lhs, T&& rhs) {
327
331
return lhs == bson_value::view{std::forward<T>(rhs)};
328
332
}
329
333
330
334
// / @relatesalso bsoncxx::v_noabi::types::bson_value::view
331
335
template <typename T>
332
- detail::requires_t <bool , is_bson_view_compatible<T>> //
336
+ detail::requires_t <bool , detail:: is_bson_view_compatible<T>> //
333
337
operator ==(T&& lhs, const bson_value::view& rhs) {
334
338
return bson_value::view{std::forward<T>(lhs)} == rhs;
335
339
}
336
340
337
341
// / @relatesalso bsoncxx::v_noabi::types::bson_value::view
338
342
template <typename T>
339
- detail::requires_t <bool , is_bson_view_compatible<T>> //
343
+ detail::requires_t <bool , detail:: is_bson_view_compatible<T>> //
340
344
operator !=(const bson_value::view& lhs, T&& rhs) {
341
345
return lhs != bson_value::view{std::forward<T>(rhs)};
342
346
}
343
347
344
348
// / @relatesalso bsoncxx::v_noabi::types::bson_value::view
345
349
template <typename T>
346
- detail::requires_t <bool , is_bson_view_compatible<T>> //
350
+ detail::requires_t <bool , detail:: is_bson_view_compatible<T>> //
347
351
operator !=(T&& lhs, const bson_value::view& rhs) {
348
352
return bson_value::view{std::forward<T>(lhs)} != rhs;
349
353
}
0 commit comments