aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/experimental
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /contrib/libs/cxxsupp/libcxx/include/experimental
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/experimental')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/experimental/functional74
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/experimental/iterator12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/experimental/type_traits12
3 files changed, 49 insertions, 49 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/functional b/contrib/libs/cxxsupp/libcxx/include/experimental/functional
index 5d28714566..e3220e16ca 100644
--- a/contrib/libs/cxxsupp/libcxx/include/experimental/functional
+++ b/contrib/libs/cxxsupp/libcxx/include/experimental/functional
@@ -113,7 +113,7 @@ template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS default_searcher {
public:
_LIBCPP_INLINE_VISIBILITY
- default_searcher(_ForwardIterator __f, _ForwardIterator __l,
+ default_searcher(_ForwardIterator __f, _ForwardIterator __l,
_BinaryPredicate __p = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__p) {}
@@ -152,12 +152,12 @@ public: // TODO private:
const _Value __default_value_;
std::unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table;
-
+
public:
_LIBCPP_INLINE_VISIBILITY
_BMSkipTable(size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred)
: __default_value_(__default), __table(__sz, __hf, __pred) {}
-
+
_LIBCPP_INLINE_VISIBILITY
void insert(const key_type &__key, value_type __val)
{
@@ -172,7 +172,7 @@ public:
}
};
-
+
// Special case small numeric values; use an array
template<class _Key, typename _Value, class _Hash, class _BinaryPredicate>
class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
@@ -190,7 +190,7 @@ public:
{
std::fill_n(__table.begin(), __table.size(), __default);
}
-
+
_LIBCPP_INLINE_VISIBILITY
void insert(key_type __key, value_type __val)
{
@@ -205,8 +205,8 @@ public:
};
-template <class _RandomAccessIterator1,
- class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
+template <class _RandomAccessIterator1,
+ class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
private:
@@ -218,9 +218,9 @@ private:
is_same<_Hash, hash<value_type>>::value &&
is_same<_BinaryPredicate, equal_to<>>::value
> skip_table_type;
-
+
public:
- boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
+ boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
_Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__pred),
__pattern_length_(_VSTD::distance(__first_, __last_)),
@@ -233,13 +233,13 @@ public:
this->__build_suffix_table ( __first_, __last_, __pred_ );
}
-
+
template <typename _RandomAccessIterator2>
pair<_RandomAccessIterator2, _RandomAccessIterator2>
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
{
static_assert ( std::is_same<
- typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator1>::value_type>::type,
+ typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator1>::value_type>::type,
typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator2>::value_type>::type
>::value,
"Corpus and Pattern iterators must point to the same type" );
@@ -251,10 +251,10 @@ public:
if ( __pattern_length_ > _VSTD::distance(__f, __l))
return make_pair(__l, __l);
- // Do the search
+ // Do the search
return this->__search(__f, __l);
}
-
+
public: // TODO private:
_RandomAccessIterator1 __first_;
_RandomAccessIterator1 __last_;
@@ -271,7 +271,7 @@ public: // TODO private:
const _RandomAccessIterator2 __last = __l - __pattern_length_;
const skip_table_type & __skip = *__skip_.get();
const vector<difference_type> & __suffix = *__suffix_.get();
-
+
while (__cur <= __last)
{
@@ -283,7 +283,7 @@ public: // TODO private:
if ( __j == 0 )
return make_pair(__cur, __cur + __pattern_length_);
}
-
+
// Since we didn't match, figure out how far to skip forward
difference_type __k = __skip[__cur [ __j - 1 ]];
difference_type __m = __j - __k - 1;
@@ -292,7 +292,7 @@ public: // TODO private:
else
__cur += __suffix[ __j ];
}
-
+
return make_pair(__l, __l); // We didn't find anything
}
@@ -301,21 +301,21 @@ public: // TODO private:
void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix )
{
const size_t __count = _VSTD::distance(__f, __l);
-
+
__prefix[0] = 0;
size_t __k = 0;
for ( size_t __i = 1; __i < __count; ++__i )
{
while ( __k > 0 && !__pred ( __f[__k], __f[__i] ))
__k = __prefix [ __k - 1 ];
-
+
if ( __pred ( __f[__k], __f[__i] ))
__k++;
__prefix [ __i ] = __k;
}
}
- void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
+ void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
_BinaryPredicate __pred)
{
const size_t __count = _VSTD::distance(__f, __l);
@@ -323,19 +323,19 @@ public: // TODO private:
if (__count > 0)
{
vector<value_type> __scratch(__count);
-
+
__compute_bm_prefix(__f, __l, __pred, __scratch);
for ( size_t __i = 0; __i <= __count; __i++ )
__suffix[__i] = __count - __scratch[__count-1];
-
+
typedef reverse_iterator<_RandomAccessIterator1> _RevIter;
__compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch);
-
+
for ( size_t __i = 0; __i < __count; __i++ )
{
const size_t __j = __count - __scratch[__i];
const difference_type __k = __i - __scratch[__i] + 1;
-
+
if (__suffix[__j] > __k)
__suffix[__j] = __k;
}
@@ -344,20 +344,20 @@ public: // TODO private:
};
-template<class _RandomAccessIterator,
- class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
+template<class _RandomAccessIterator,
+ class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
class _BinaryPredicate = equal_to<>>
_LIBCPP_INLINE_VISIBILITY
boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>
-make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
+make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
_Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ())
{
return boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>(__f, __l, __hf, __p);
}
// boyer-moore-horspool
-template <class _RandomAccessIterator1,
- class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
+template <class _RandomAccessIterator1,
+ class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
private:
@@ -371,7 +371,7 @@ private:
> skip_table_type;
public:
- boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
+ boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
_Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__pred),
__pattern_length_(_VSTD::distance(__first_, __last_)),
@@ -385,13 +385,13 @@ public:
__skip_->insert(*__f, __pattern_length_ - 1 - __i);
}
}
-
+
template <typename _RandomAccessIterator2>
pair<_RandomAccessIterator2, _RandomAccessIterator2>
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
{
static_assert ( std::is_same<
- typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator1>::value_type>::type,
+ typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator1>::value_type>::type,
typename std::__uncvref<typename std::iterator_traits<_RandomAccessIterator2>::value_type>::type
>::value,
"Corpus and Pattern iterators must point to the same type" );
@@ -403,10 +403,10 @@ public:
if ( __pattern_length_ > _VSTD::distance(__f, __l))
return make_pair(__l, __l);
- // Do the search
+ // Do the search
return this->__search(__f, __l);
}
-
+
private:
_RandomAccessIterator1 __first_;
_RandomAccessIterator1 __last_;
@@ -434,17 +434,17 @@ private:
}
__cur += __skip[__cur[__pattern_length_-1]];
}
-
+
return make_pair(__l, __l);
}
};
-template<class _RandomAccessIterator,
- class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
+template<class _RandomAccessIterator,
+ class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
class _BinaryPredicate = equal_to<>>
_LIBCPP_INLINE_VISIBILITY
boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>
-make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
+make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
_Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ())
{
return boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>(__f, __l, __hf, __p);
diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/iterator b/contrib/libs/cxxsupp/libcxx/include/experimental/iterator
index 43f1bd8d7a..09ea2cbcc7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/experimental/iterator
+++ b/contrib/libs/cxxsupp/libcxx/include/experimental/iterator
@@ -26,19 +26,19 @@ namespace std {
typedef void difference_type;
typedef void pointer;
typedef void reference;
-
+
ostream_joiner(ostream_type& s, const DelimT& delimiter);
ostream_joiner(ostream_type& s, DelimT&& delimiter);
- template<typename T>
+ template<typename T>
ostream_joiner& operator=(const T& value);
ostream_joiner& operator*() noexcept;
ostream_joiner& operator++() noexcept;
ostream_joiner& operator++(int) noexcept;
private:
- ostream_type* out_stream; // exposition only
- DelimT delim; // exposition only
+ ostream_type* out_stream; // exposition only
+ DelimT delim; // exposition only
bool first_element; // exposition only
};
@@ -78,11 +78,11 @@ public:
ostream_joiner(ostream_type& __os, _Delim&& __d)
: __output_iter(_VSTD::addressof(__os)), __delim(_VSTD::move(__d)), __first(true) {}
-
+
ostream_joiner(ostream_type& __os, const _Delim& __d)
: __output_iter(_VSTD::addressof(__os)), __delim(__d), __first(true) {}
-
+
template<typename _Tp>
ostream_joiner& operator=(const _Tp& __v)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/type_traits b/contrib/libs/cxxsupp/libcxx/include/experimental/type_traits
index a5e554b34a..ea1335f96a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/experimental/type_traits
+++ b/contrib/libs/cxxsupp/libcxx/include/experimental/type_traits
@@ -60,7 +60,7 @@ inline namespace fundamentals_v1 {
using is_detected_convertible = is_convertible<detected_t<Op, Args...>, To>;
template <class To, template<class...> class Op, class... Args>
constexpr bool is_detected_convertible_v
- = is_detected_convertible<To, Op, Args...>::value;
+ = is_detected_convertible<To, Op, Args...>::value;
} // namespace fundamentals_v1
} // namespace experimental
@@ -106,9 +106,9 @@ using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type;
template <class...> using void_t = void;
struct nonesuch : private __nat { // make nonesuch "not an aggregate"
- ~nonesuch() = delete;
- nonesuch (nonesuch const&) = delete;
- void operator=(nonesuch const&) = delete;
+ ~nonesuch() = delete;
+ nonesuch (nonesuch const&) = delete;
+ void operator=(nonesuch const&) = delete;
};
template <class _Default, class _AlwaysVoid, template <class...> class _Op, class... _Args>
@@ -123,7 +123,7 @@ struct _DETECTOR<_Default, void_t<_Op<_Args...>>, _Op, _Args...> {
using type = _Op<_Args...>;
};
-
+
template <template<class...> class _Op, class... _Args>
using is_detected = typename _DETECTOR<nonesuch, void, _Op, _Args...>::value_t;
template <template<class...> class _Op, class... _Args>
@@ -144,7 +144,7 @@ template <class Expected, template<class...> class _Op, class... _Args>
template <class To, template<class...> class _Op, class... _Args>
using is_detected_convertible = is_convertible<detected_t<_Op, _Args...>, To>;
template <class To, template<class...> class _Op, class... _Args>
- _LIBCPP_CONSTEXPR bool is_detected_convertible_v = is_detected_convertible<To, _Op, _Args...>::value;
+ _LIBCPP_CONSTEXPR bool is_detected_convertible_v = is_detected_convertible<To, _Op, _Args...>::value;
_LIBCPP_END_NAMESPACE_LFTS