* er:
>
> how can i enforce the requirement below ?
>
> template<class RANDOM>//template member function
> double A<RANDOM>:
perator()(RANDOM& u){
> /* requirement: RANDOM::result_type is double */
>
> /* body of the function */
> };
The Boost library provides facilities for compile time assertions and
compile time checking of whether two types are the same. Compile time
assertions will become part of the language in C++0x, but with slightly
different syntax than the Boost macro. There is however a good chance
that it would be better to rethink the design rather than enforce.
Btw., don't use all uppercase for non-macro names.
Reserve all uppercase for macro names, to reduce possibility of name
collisions.
Cheers, & hth.,
- Alf
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?