diff options
author | anastasy888 <anastasy888@yandex-team.ru> | 2022-02-10 16:45:54 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:54 +0300 |
commit | 49f765d71da452ea93138a25559dfa68dd76c7f3 (patch) | |
tree | 1016041feb637349e401dcc0fa85217dd2c2c639 /contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h | |
parent | 7353a3fdea9c67c256980c00a2b3b67f09b23a27 (diff) | |
download | ydb-49f765d71da452ea93138a25559dfa68dd76c7f3.tar.gz |
Restoring authorship annotation for <anastasy888@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h')
-rw-r--r-- | contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h b/contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h index fc81b787eb..3e2dfed99d 100644 --- a/contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h +++ b/contrib/restricted/abseil-cpp/absl/random/internal/distribution_caller.h @@ -1,40 +1,40 @@ -// -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ -#define ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ - -#include <utility> - +// +// Copyright 2018 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ +#define ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ + +#include <utility> + #include "absl/base/config.h" #include "absl/base/internal/fast_type_id.h" #include "absl/utility/utility.h" -namespace absl { +namespace absl { ABSL_NAMESPACE_BEGIN -namespace random_internal { - -// DistributionCaller provides an opportunity to overload the general -// mechanism for calling a distribution, allowing for mock-RNG classes -// to intercept such calls. -template <typename URBG> -struct DistributionCaller { +namespace random_internal { + +// DistributionCaller provides an opportunity to overload the general +// mechanism for calling a distribution, allowing for mock-RNG classes +// to intercept such calls. +template <typename URBG> +struct DistributionCaller { // SFINAE to detect whether the URBG type includes a member matching // bool InvokeMock(base_internal::FastTypeIdType, void*, void*). - // + // // These live inside BitGenRef so that they have friend access // to MockingBitGen. (see similar methods in DistributionCaller). template <template <class...> class Trait, class AlwaysVoid, class... Args> @@ -54,9 +54,9 @@ struct DistributionCaller { template <typename DistrT, typename... Args> static typename DistrT::result_type Impl(std::false_type, URBG* urbg, Args&&... args) { - DistrT dist(std::forward<Args>(args)...); - return dist(*urbg); - } + DistrT dist(std::forward<Args>(args)...); + return dist(*urbg); + } // Mock implementation of distribution caller. // The underlying KeyT must match the KeyT constructed by MockOverloadSet. @@ -83,10 +83,10 @@ struct DistributionCaller { return Impl<DistrT, Args...>(HasInvokeMock{}, urbg, std::forward<Args>(args)...); } -}; - -} // namespace random_internal +}; + +} // namespace random_internal ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ +} // namespace absl + +#endif // ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_ |