Boost logo

Boost :

Subject: Re: [boost] Design conventions; passing functors
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2008-11-29 11:55:54


I used to like template template, but I've decided it's fairly useless. The problem is:

template<template<class A>a>
does not match a class with a default parameter. So, for example, suppose you have a class where you specify a container class as a parameter. For example:

template<typename T, template<class Vec> vec >
class my_class ...

This won't match
my_class<int, std::vector>

Because std::vector has a defaulted alloc parameter. This ruins the design (my_class shouldn't need to know anything about default parameters of the container. How could it know what other vector-like classes there could be and what default parameters they might have?)


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