[GiNaC-devel] Class container vs. the holy standard?
Richard B. Kreckel
kreckel at ginac.de
Tue Apr 25 00:19:17 CEST 2006
David Fang wrote:
>
>I might see what other template metaprogramming techniques have to offer.
>I'm only a newbie in this subject, still learning on the fly. I would be
>very interested to hear what solution you end up using.
>
>
The problem is we can't have template <template <class, class> class C>
class container besides template <template <class> class C> class
container. But in this case, I think we can just name the former
diffently, for example container_with_allocator. The attached patch is a
quick shot: on first sight it's uglier that what has been suggested
before (writing template <template< class T, class A = std::allocator<T>
> class C> class container, but it doesn't turn all container types
into container-assuming-STL types.
It has the problem that it still fails to link and on gcc-4.2 it even
fails to compile with very strange error mesages from the assembler.
But, heck, who cares!?
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc42.patch
Type: text/x-patch
Size: 19150 bytes
Desc: not available
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20060425/5d9734f5/attachment.bin>
More information about the GiNaC-devel
mailing list