Skip to content

Commit 8161e4c

Browse files
committed
Don't use implementation details for old sorters
We are removing old sorters, partitally because it is assumed that users can reimplement them with simple compositions of existing components. Using implementation details to reimplement them defeats the point.
1 parent 2df2ed4 commit 8161e4c

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

tests/testing-tools/old_sorters.h

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ struct old_default_sorter:
4545
>
4646
{};
4747

48-
namespace cppsort
49-
{
5048
template<>
51-
struct stable_adapter<::old_default_sorter>:
49+
struct cppsort::stable_adapter<::old_default_sorter>:
5250
cppsort::merge_sorter
5351
{
5452
stable_adapter() = default;
@@ -57,7 +55,6 @@ namespace cppsort
5755
stable_adapter()
5856
{}
5957
};
60-
}
6158

6259
////////////////////////////////////////////////////////////
6360
// drop_merge_sorter
@@ -94,34 +91,29 @@ struct old_verge_sorter:
9491
old_verge_sorter() = default;
9592
};
9693

97-
namespace cppsort
98-
{
9994
template<>
100-
struct stable_adapter<::old_verge_sorter>:
101-
cppsort::sorter_facade<
102-
cppsort::detail::verge_adapter_impl<
95+
struct cppsort::stable_adapter<::old_verge_sorter>:
96+
cppsort::stable_t<
97+
cppsort::verge_adapter<
10398
cppsort::hybrid_adapter<
10499
cppsort::pdq_sorter,
105100
cppsort::quick_merge_sorter
106-
>,
107-
true
101+
>
108102
>
109103
>
110104
{
111105
stable_adapter() = default;
112106

113107
constexpr explicit stable_adapter(const ::old_verge_sorter&):
114-
cppsort::sorter_facade<
115-
cppsort::detail::verge_adapter_impl<
108+
cppsort::stable_t<
109+
cppsort::verge_adapter<
116110
cppsort::hybrid_adapter<
117111
cppsort::pdq_sorter,
118112
cppsort::quick_merge_sorter
119-
>,
120-
true
113+
>
121114
>
122115
>()
123116
{}
124117
};
125-
}
126118

127119
#endif // CPPSORT_TESTSUITE_OLD_SORTERS_H_

0 commit comments

Comments
 (0)