Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Draft of the C++0x standard at 1325 pages

Name: Anonymous 2010-05-22 21:03

Name: Anonymous 2010-05-23 18:18

namespace std {
template <intmax_t N, intmax_t D = 1> class ratio;
// ratio arithmetic
template <class R1, class R2> using ratio_add = see below;
template <class R1, class R2> using ratio_subtract = see below;
template <class R1, class R2> using ratio_multiply = see below;
template <class R1, class R2> using ratio_divide = see below;
// ratio comparison
template <class R1, class R2> struct ratio_equal;
template <class R1, class R2> struct ratio_not_equal;
template <class R1, class R2> struct ratio_less;
template <class R1, class R2> struct ratio_less_equal;
template <class R1, class R2> struct ratio_greater;
template <class R1, class R2> struct ratio_greater_equal;
// convenience SI typedefs
typedef ratio<1, 1000000000000000000000000> yocto; // see 20.6.4
typedef ratio<1, 1000000000000000000000> zepto; // see 20.6.4
typedef ratio<1, 1000000000000000000> atto;
typedef ratio<1, 1000000000000000> femto;
typedef ratio<1, 1000000000000> pico;
typedef ratio<1, 1000000000> nano;
typedef ratio<1, 1000000> micro;
typedef ratio<1, 1000> milli;
typedef ratio<1, 100> centi;
typedef ratio<1, 10> deci;
typedef ratio< 10, 1> deca;
typedef ratio< 100, 1> hecto;
typedef ratio< 1000, 1> kilo;
typedef ratio< 1000000, 1> mega;
typedef ratio< 1000000000, 1> giga;
typedef ratio< 1000000000000, 1> tera;
typedef ratio< 1000000000000000, 1> peta;
typedef ratio< 1000000000000000000, 1> exa;
typedef ratio< 1000000000000000000000, 1> zetta; // see 20.6.4
typedef ratio<1000000000000000000000000, 1> yotta; // see 20.6.4
}
namespace std {
template <intmax_t N, intmax_t D = 1>
class ratio {
public:
typedef ratio type;
static constexpr intmax_t num;
static constexpr intmax_t den;
};
}


I wish I was making this up.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List