Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-02-02 14:07:40


--- David Abrahams <dave_at_[hidden]> wrote:

> You can do that, but IIUC it won't get you where Genny's trying to go:
> namely that if static_log2 happens to get adjusted so its parameter is
> an unsigned long long constant, you can detect that without causing an
> error.

No. Because in the real code I would have written:

  // actually in namespace detail
  typedef unsigned long static_log2_arg_type; // (*)

  template <static_log2_arg_type N>
  struct static_log2 {};

  template <class T>
  struct argument_type;

  template < static_log2_arg_type x > // ***
  struct argument_type< static_log2<x> > {
     typedef static_log2_arg_type type;
  };

and the only point subject to modification would have been (*). My problem was
just that I don't like to specify a value when retrieving the argument type.

Genny.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk