mirror of
https://github.com/dlang/phobos.git
synced 2025-05-04 17:11:26 +03:00
Use Flag instead of single-use enum.
This commit is contained in:
parent
b7c3816fdb
commit
a61fb6e542
1 changed files with 2 additions and 5 deletions
|
@ -4552,11 +4552,8 @@ Group!(pred, Range) group(alias pred = "a == b", Range)(Range r)
|
||||||
/**
|
/**
|
||||||
* Specifies whether a predicate is an equivalence relation.
|
* Specifies whether a predicate is an equivalence relation.
|
||||||
*/
|
*/
|
||||||
enum IsEquivRelation : bool
|
import std.typecons : Flag;
|
||||||
{
|
alias IsEquivRelation = Flag!"isEquivRelation";
|
||||||
no, /// Predicate is not an equivalence relation
|
|
||||||
yes, /// Predicate is an equivalence relation
|
|
||||||
}
|
|
||||||
|
|
||||||
// Used by implementation of groupBy.
|
// Used by implementation of groupBy.
|
||||||
private struct GroupByChunkImpl(alias pred, IsEquivRelation isEquivRelation, Range)
|
private struct GroupByChunkImpl(alias pred, IsEquivRelation isEquivRelation, Range)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue