Skip to content

Commit

Permalink
Use builtin trait isArithmetic in isNumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
nordlow committed Jan 25, 2017
1 parent 5a4e462 commit a07517a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -5347,7 +5347,7 @@ enum bool isFloatingPoint(T) = __traits(isFloating, T);
Detect whether $(D T) is a built-in numeric type (integral or floating
point).
*/
enum bool isNumeric(T) = is(NumericTypeOf!T) && !isAggregateType!T;
enum bool isNumeric(T) = __traits(isArithmetic, T);

@safe unittest
{
Expand Down

0 comments on commit a07517a

Please sign in to comment.