doc: fixed

This commit is contained in:
Michele Caini
2017-12-13 16:20:36 +01:00
parent 451e4050db
commit 36bb55a9ce
2 changed files with 11 additions and 6 deletions

View File

@@ -723,11 +723,9 @@ public:
* comparison function should be equivalent to the following:
*
* @code{.cpp}
* bool(auto e1, auto e2)
* bool(const Component &, const Component &)
* @endcode
*
* Where `e1` and `e2` are valid entity identifiers.
*
* @tparam Component Type of components to sort.
* @tparam Compare Type of comparison function object.
* @param compare A valid comparison function object.

View File

@@ -517,13 +517,20 @@ public:
* iterators returns them in the expected order. See `begin` and `end` for
* more details.
*
* The comparison function object must return `true` if the first element
* is _less_ than the second one, `false` otherwise. The signature of the
* comparison function should be equivalent to the following:
*
* @code{.cpp}
* bool(const Type &, const Type &)
* @endcode
*
* @note
* Attempting to iterate elements using the raw pointer returned by `data`
* gives no guarantees on the order, even though `sort` has been invoked.
*
* @tparam Compare Type of the comparison function.
* @param compare A comparison function whose signature shall be equivalent
* to: `bool(const Type &, const Type &)`.
* @tparam Compare Type of comparison function object.
* @param compare A valid comparison function object.
*/
template<typename Compare>
void sort(Compare compare) {