|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-06-27 09:36:39
I am writing template math functions.
Some can take integral types (only)
Some can take real (both built-in floating-point - float, double.. AND User
Defined real types)
And some can take either integral OR real.
Real : Floating-point types
Integer : Integral types
Arithmetic : Either Integral OR Floating-point types
Arithmetic is a bit long - other ideas?
So to write a function something like
template <class RealType>
RealType students_t(ArithmeticType degrees_of_freedom, RealType t)
{ ...
}
Using just T is not an option because there are three (at least) possibles.
What names should I use for the types?
RealType, real_type, RealT, or RT, or ???
IntType, int_type, IntT, IT, or ???
ArithmeticType, arithmetic_type, ArithType, arith_type, AT ???
Suggestions for names please. Rationales? Prior art? Precedents? Standards?
Thanks
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk