mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
fix coding-style
This commit is contained in:
parent
df3023db30
commit
5ce2cb023c
196 changed files with 1180 additions and 1787 deletions
|
@ -13,11 +13,10 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation_impl(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator1 first1_
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation_impl(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator1 first1_
|
||||
)
|
||||
{
|
||||
return first1_ == last1 ? true
|
||||
|
@ -30,17 +29,19 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation_impl(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator1 first1_,
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation_impl(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator1 first1_,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return first1_ == last1 ? true
|
||||
: sprout::count_if(first1, last1, NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)), NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(
|
||||
first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_)
|
||||
)
|
||||
&& sprout::detail::is_permutation_impl(first1, last1, first2, sprout::next(first1_), pred)
|
||||
? true
|
||||
: false
|
||||
|
@ -50,23 +51,14 @@ namespace sprout {
|
|||
|
||||
// 25.2.12 Is permutation
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2) {
|
||||
return sprout::detail::is_permutation_impl(first1, last1, first2, first1);
|
||||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, BinaryPredicate pred) {
|
||||
return sprout::detail::is_permutation_impl(first1, last1, first2, first1, pred);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue