Skip to content

Commit

Permalink
Fix phobos.sys.meta example which is broken on 32-bit systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdavis committed Oct 26, 2024
1 parent 84e8b13 commit d3cd2cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions phobos/sys/meta.d
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,13 @@ private template AppendIfUnique(alias Cmp, Args...)
///
@safe unittest
{
alias Types = AliasSeq!(int, uint, long, string, short, int*, ushort);
alias Types = AliasSeq!(int, uint, long, short, int*, ushort);

template sameSize(T)
{
enum sameSize(U) = T.sizeof == U.sizeof;
}
static assert(is(Unique!(sameSize, Types) ==
AliasSeq!(int, long, string, short)));
static assert(is(Unique!(sameSize, Types) == AliasSeq!(int, long, short)));

// The predicate must be partially instantiable.
enum sameSize_fails(T, U) = T.sizeof == U.sizeof;
Expand Down

0 comments on commit d3cd2cf

Please sign in to comment.