Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-04-11 23:19:40


Xavier,

This is not really an appropriate post for the boost group. You might try
the comp.lang.c++ or comp.lang.c++.moderated newsgroup instead.

Thanks,
Dave

P.S. Member templates are part of the C++ standard. I suggest you get
yourself a copy of the standard document (http://webstore.ansi.org).

on 4/12/00 2:21 AM, xavier at xavier_at_[hidden] wrote:
> Hello,
>
> I'm experiencing trouble with member templates, I've got something like
> this :
>
> class Foo {
> // ...
> public:
> // ...
> int size();
> // ...
> template <class T> T* alloc() { return new T [size()]; }
> };
>
> And I use it like this :
>
> void f()
> {
> Foo f;
> // ...
> float* pf = f.alloc<float>();
> }
>
> My compiler (egcs/g++ 2.9.x) claims that there is an error near '<' or '>'
> (I can't remember :)). Any idea?
>
> I heard that member templates are not ANSI compliant but supported by most
> compilers and they are really useful...
>
> - Xavier
>
>
> ------------------------------------------------------------------------
> Win $1000 this Friday!
> Go to:
> http://click.egroups.com/1/2892/2/_/9351/_/955524211/
> ------------------------------------------------------------------------
>
>


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