Skip to content

Commit 1faa5ce

Browse files
committed
Embrase the dual GitHub/Codeberg nature of the project
1 parent 496eadc commit 1faa5ce

10 files changed

Lines changed: 37 additions & 32 deletions

File tree

README.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![cpp-sort logo](docs/images/cpp-sort-logo.svg)
22

3-
[![Latest Release](https://img.shields.io/badge/release-2.0.0-blue.svg)](https://github.com/Morwenn/cpp-sort/releases/tag/v2.0.0)
3+
[![Latest Release](https://img.shields.io/badge/release-2.0.0-blue.svg)](https://codeberg.org/Morwenn/cpp-sort/releases/tag/v2.0.0)
44
[![Conan Package](https://img.shields.io/badge/conan-cpp--sort%2F2.0.0-blue.svg)](https://conan.io/center/recipes/cpp-sort?version=2.0.0)
55
[![Code Coverage](https://codecov.io/gh/Morwenn/cpp-sort/branch/2.x.y-develop/graph/badge.svg)](https://codecov.io/gh/Morwenn/cpp-sort)
66
[![Pitchfork Layout](https://img.shields.io/badge/standard-PFL-orange.svg)](https://github.com/vector-of-bool/pitchfork)
@@ -41,11 +41,11 @@ anything to be backported._
4141

4242
**cpp-sort** provides a full set of sorting-related features. Here are the main building blocks
4343
of the library:
44-
* Every sorting algorithm exists as a function object called a [sorter](https://github.com/Morwenn/cpp-sort/wiki/Sorters)
45-
* Sorters can be wrapped in [sorter adapters](https://github.com/Morwenn/cpp-sort/wiki/Sorter-adapters) to augment their behaviour
46-
* The library provides a [sorter facade](https://github.com/Morwenn/cpp-sort/wiki/Sorter-facade) to easily build sorters
47-
* [Fixed-size sorters](https://github.com/Morwenn/cpp-sort/wiki/Fixed-size-sorters) can be used to efficiently sort tiny fixed-size collections
48-
* [Measures of disorder](https://github.com/Morwenn/cpp-sort/wiki/Measures-of-disorder) can be used to evaluate the disorder in a collection
44+
* Every sorting algorithm exists as a function object called a [sorter][sorters]
45+
* Sorters can be wrapped in [sorter adapters][sorter-adapters] to augment their behaviour
46+
* The library provides a [sorter facade][sorter-facade] to easily build sorters
47+
* [Fixed-size sorters][fixed-size-sorters] can be used to efficiently sort tiny fixed-size collections
48+
* [Measures of disorder][measures-of-disorder] can be used to evaluate the disorder in a collection
4949

5050
Here is a more complete example of what can be done with the library:
5151

@@ -97,7 +97,7 @@ some interesting guarantees (ideas often taken from the Ranges TS):
9797
* Sorters are function objects: they can directly be passed as "overload sets" to other functions
9898

9999
You can read more about all the available tools and find some tutorials about using
100-
and extending **cpp-sort** in [the wiki](https://github.com/Morwenn/cpp-sort/wiki).
100+
and extending **cpp-sort** in [the wiki][cpp-sort-wiki].
101101

102102
# Benchmarks
103103

@@ -150,7 +150,7 @@ You can read more about those [in the wiki][tooling].
150150
> piece.*
151151
> — Jarod Kintz, $3.33
152152
153-
Even though some parts of the library are [original research](https://github.com/Morwenn/cpp-sort/wiki/Original-research)
153+
Even though some parts of the library are [original research][original-research]
154154
and some others correspond to custom and rather naive implementations of standard
155155
sorting algorithms, **cpp-sort** also reuses a great deal of code and ideas from
156156
open-source projects, often altered to integrate seamlessly into the library. Here
@@ -175,12 +175,11 @@ module](https://www.boost.org/doc/libs/1_80_0/libs/sort/doc/html/index.html).
175175
in [Boost.Sort](https://www.boost.org/doc/libs/1_80_0/libs/sort/doc/html/index.html).
176176
by Francisco Jose Tapia.
177177

178-
* [`utility::as_function`](https://github.com/Morwenn/cpp-sort/wiki/Miscellaneous-utilities#as_function),
179-
and several projection-enhanced helper algorithms come from Eric Niebler's [Range
180-
v3](https://github.com/ericniebler/range-v3) library. Several ideas such as proxy
181-
iterators, customization points and projections, as well as a few other utility
182-
functions also come from that library or from the related articles and standard
183-
C++ proposals.
178+
* [`utility::as_function`][utility-as-function], and several projection-enhanced helper
179+
algorithms come from Eric Niebler's [Range v3](https://github.com/ericniebler/range-v3)
180+
library. Several ideas such as proxy iterators, customization points and projections,
181+
as well as a few other utility functions also come from that library or from the related
182+
articles and standard C++ proposals.
184183

185184
* The algorithm used by `ska_sorter` comes from Malte Skarupke's [implementation](https://github.com/skarupke/ska_sort)
186185
of his own [ska_sort](https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/) algorithm.
@@ -248,9 +247,17 @@ developed by Thøger Rivera-Thorsen.
248247

249248

250249
[adaptive-sort]: https://en.wikipedia.org/wiki/Adaptive_sort
251-
[benchmarks]: https://github.com/Morwenn/cpp-sort/wiki/Benchmarks
252-
[changelog]: https://github.com/Morwenn/cpp-sort/wiki/Changelog
253-
[drop-merge-adapter]: https://github.com/Morwenn/cpp-sort/wiki/Sorter-adapters#drop_merge_adapter
254-
[heap-sorter]: https://github.com/Morwenn/cpp-sort/wiki/Sorters#heap_sorter
255-
[split-adapter]: https://github.com/Morwenn/cpp-sort/wiki/Sorter-adapters#split_adapter
256-
[tooling]: https://github.com/Morwenn/cpp-sort/wiki/Tooling
250+
[benchmarks]: https://codeberg.org/Morwenn/cpp-sort/wiki/Benchmarks
251+
[changelog]: https://codeberg.org/Morwenn/cpp-sort/wiki/Changelog
252+
[cpp-sort-wiki]: https://codeberg.org/Morwenn/cpp-sort/wiki
253+
[drop-merge-adapter]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorter-adapters#drop_merge_adapter
254+
[fixed-size-sorters]: https://codeberg.org/Morwenn/cpp-sort/wiki/Fixed-size-sorters
255+
[heap-sorter]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorters#heap_sorter
256+
[measures-of-disorder]: https://codeberg.org/Morwenn/cpp-sort/wiki/Measures-of-disorder
257+
[original-research]: https://codeberg.org/Morwenn/cpp-sort/wiki/Original-research
258+
[sorter-adapters]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorter-adapters
259+
[sorter-facade]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorter-facade
260+
[sorters]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorters
261+
[split-adapter]: https://codeberg.org/Morwenn/cpp-sort/wiki/Sorter-adapters#split_adapter
262+
[tooling]: https://codeberg.org/Morwenn/cpp-sort/wiki/Tooling
263+
[utility-as-function]: https://codeberg.org/Morwenn/cpp-sort/wiki/Miscellaneous-utilities#as_function

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CppSortConan(ConanFile):
1919
version = "2.0.0"
2020
description = "Sorting algorithms & related tools"
2121
license = "MIT"
22-
url = "https://github.com/Morwenn/cpp-sort"
22+
url = "https://codeberg.org/Morwenn/cpp-sort"
2323
homepage = url
2424
topics = "cpp-sort", "sorting", "algorithms"
2525
author = "Morwenn <morwenn29@hotmail.fr>"

docs/Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ When compiled with C++20, **cpp-sort** might gain a few additional features depe
4040
[branchless-traits]: Miscellaneous-utilities.md#branchless-traits
4141
[counting-sorter]: Sorters.md#counting_sorter
4242
[cpp-sort-function-objects]: Miscellaneous-utilities.md#miscellaneous-function-objects
43-
[cpp-sort-releases]: https://github.com/Morwenn/cpp-sort/releases
43+
[cpp-sort-releases]: https://codeberg.org/Morwenn/cpp-sort/releases
4444
[feature-test-macros]: https://wg21.link/SD6
4545
[pdq-sorter]: Sorters.md#pdq_sorter
4646
[ska-sorter]: Sorters.md#ska_sorter

docs/Quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ The previous sections describe some of the main tools provided by **cpp-sort** b
228228
[std-searchers]: https://en.cppreference.com/w/cpp/utility/functional#Searchers
229229
[std-sort]: https://en.cppreference.com/w/cpp/algorithm/sort
230230
[tooling]: Tooling.md
231-
[utility-apply-permutation]: https://github.com/Morwenn/cpp-sort/wiki/Miscellaneous-utilities#apply_permutation
232-
[utility-sorted-indices]: https://github.com/Morwenn/cpp-sort/wiki/Miscellaneous-utilities#sorted_indices
231+
[utility-apply-permutation]: Miscellaneous-utilities.md#apply_permutation
232+
[utility-sorted-indices]: Miscellaneous-utilities.md#sorted_indices

docs/Sorter-facade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The return type `Ret` can either match that of the sorter, or be `void`, in whic
4545

4646
Note that the function pointer conversion syntax above is made up, but it allows to clearly highlight what it does while hiding the `typedef`s needed for the syntax to be valid. In these signatures, `Ret` is the [`std::result_of_t`][std-result-of] of the sorter called with the parameters. The actual implementation is more verbose and redundant, but it allows to transform a sorter into a function pointer corresponding to any valid overload of `operator()`.
4747

48-
***WARNING:** conversion to function pointers does not work with MSVC ([issue #185][issue-185]).*
48+
***WARNING:** conversion to function pointers does not work with MSVC ([issue github#185][issue-185]).*
4949

5050
## `operator()`
5151

docs/Sorters.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ struct spread_sorter:
465465
[heap-sorter]: Sorters.md#heap_sorter
466466
[insertion-sort]: https://en.wikipedia.org/wiki/Insertion_sort
467467
[introselect]: https://en.wikipedia.org/wiki/Introselect
468-
[issue-168]: https://github.com/Morwenn/cpp-sort/issues/168
469468
[measures-of-disorder]: Measures-of-disorder.md
470469
[median-of-medians]: https://en.wikipedia.org/wiki/Median_of_medians
471470
[merge-sort]: https://en.wikipedia.org/wiki/Merge_sort

docs/Writing-a-bubble_sorter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Generic agorithms are good, more generic algorithms are sometimes better. The cu
286286

287287
C++20 ranges introduce the notion of ["proxy iterators"][proxy-iterators], which are basically iterators that can't yield a proper reference to the object they point to, but instead yield a proxy object acting as a reference. In order to handle such iterators, C++20 introduces the *customization point objects* [`std::ranges::iter_move`][std-iter-move] and [`std::ranges::iter_swap`][std-iter-swap] which should be used instead of `std::move(*it)` and `std::iter_swap(it1, it2)` in generic algorithms that aim to support proxy iterators.
288288

289-
**cpp-sort** being a C++17 library, it can't rely on these CPOs and provides the utility functions [`utility::iter_move` and `utility::iter_swap`][utility-iter-move] to replace them. They are a bit cruder than their standard equivalents: you have to import them into the current namespace and perform an unqualified call, *à la* `std::swap`. Moreover, they are currently not compatible with their C++20 counterparts yet for legacy reasons (see [issue 223][issue-223]).
289+
**cpp-sort** being a C++17 library, it can't rely on these CPOs and provides the utility functions [`utility::iter_move` and `utility::iter_swap`][utility-iter-move] to replace them. They are a bit cruder than their standard equivalents: you have to import them into the current namespace and perform an unqualified call, *à la* `std::swap`. Moreover, they are currently not compatible with their C++20 counterparts yet for legacy reasons (see [issue github#223][issue-223]).
290290

291291
```cpp
292292
template<typename ForwardIterator, typename Compare>

docs/Writing-a-randomizing_adapter.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ When possible, a proper *sorter adapter* is expected to be callable with the sam
7272
7373
## Returned value
7474
75-
There is currently no strict rule about what a *sorter adapter* should return (this is actually a [open design issue][issue-134]), though the general wisdom is that an adapter should transparently provide as many features as the sorter it adapts when it reasonably can. The idea is that replacing the sorter by its wrapped counterpart should be easy.
75+
There is no strict rule about what a *sorter adapter* should return. The general wisdom is that an adapter should transparently provide as many features as the *sorter* it adapts when it reasonably can unless it has good reasons to to otherwise. The idea is that replacing the sorter by its wrapped counterpart should be easy.
7676
7777
We don't have a specific use for the return channel of `randomizing_adapter` and it is simple to make it transitively return whatever the wrapped sorter returns - and even convenient -, so I decided to do just that.
7878
@@ -142,7 +142,6 @@ The full implementation can be found in the `examples` folder.
142142
[ctad]: https://en.cppreference.com/w/cpp/language/class_template_argument_deduction
143143
[golden-tests]: https://en.wikipedia.org/wiki/Characterization_test
144144
[hyrums-law]: https://www.hyrumslaw.com/
145-
[issue-134]: https://github.com/Morwenn/cpp-sort/issues/134
146145
[iterator-category]: https://en.cppreference.com/w/cpp/iterator
147146
[proxy-iterators]: https://wg21.link/P0022
148147
[quick-sorter]: Sorters.md#quick_sorter

include/cpp-sort/detail/quick_merge_sort.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2025 Morwenn
2+
* Copyright (c) 2018-2026 Morwenn
33
* SPDX-License-Identifier: MIT
44
*/
55
#ifndef CPPSORT_DETAIL_QUICK_MERGE_SORT_H_
@@ -138,7 +138,7 @@ namespace cppsort::detail
138138
internal_mergesort(first, pivot, size_left, pivot, compare, projection);
139139

140140
if (std::is_base_of_v<std::random_access_iterator_tag, iterator_category_t<ForwardIterator>>) {
141-
// Avoid weird codegen bug with MinGW-w64 (see GitHub issue #151)
141+
// Avoid weird codegen bug with MinGW-w64 (see issue github#151)
142142
std::advance(first, size_left);
143143
} else {
144144
first = pivot;

tools/release_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ Miscellaneous:
4646
I didn't manage to fix every bug I could find since the previous release, so you might want to check the [list of known bugs][known-bugs].
4747

4848

49-
[deprecation-warnings]: https://github.com/Morwenn/cpp-sort/wiki#deprecation-warnings
49+
[deprecation-warnings]: https://codeberg.org/Morwenn/cpp-sort/wiki#deprecation-warnings
5050
[known-bugs]: https://github.com/Morwenn/cpp-sort/issues?q=is%3Aissue+is%3Aopen+label%3Abug

0 commit comments

Comments
 (0)