Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-02-16 12:32:38


Gabriel Dos Reis <gdr_at_[hidden]> writes:

> Gennaro Prota <gennaro_prota_at_[hidden]> writes:
>
> | Just that with one rule the user can choose what the name should
> | refer to, with the other one he/she cannot.
>
> I understand the reasoning of letting the user says what the name
> should refer to. Which makes me inclined to make the construct
> ill-formed: That is not different from the rule that says you cannot
> reclare a template-parameter in its scope.

That would be horrible for generic code. What are the requirements
on the T parameter of this class template?

   template <class T>
   struct Der : T
   {
      template <class U>
      void f(U x)
      {}
   };

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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