Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2002-02-05 18:21:29


on 2/5/02 9:23 AM, Synge Todo at wistaria_at_[hidden] wrote:

> some compilers, e.g. MIPSpro Compiler 7.3.1.2m, do not accept a
> templated template parameter:
>
> template<template<class> class C> class xxx {
> typedef C<int> ...
> };
>
> Does the header boost/config.hpp define a macro describing this defect?

I don't think such a macro exists (yet). My compiler has the same problem.
I propose the following names:

BOOST_NO_TEMPLATE_BASED_TEMPLATE_PARAMETERS
    An alternate name for Synge's idea
BOOST_NO_TYPE_BASED_TEMPLATE_PARAMETERS
    Probably not needed, since types were the original template parameters
BOOST_NO_VALUE_BASED_TEMPLATE_PARAMETERS
    In case values can't be taken (probably not needed today)

Also, some compilers (like mine) can't take value-based template parameters
that are pointers-to-member (functions). I've heard that types that can't
be used as compile-time integral values can still be a used for value-based
template parameters if that type is used for a global object. Maybe we need
a BOOST_NO_OBJECT_BASED_TEMPLATE_PARAMETERS too.

I notice that a lot of experts (and the standard?) refer to non-type
template parameters. Do they really mean value-based AND template-based
template parameters? Or do the mean just value-based template parameters,
and they forgot that _three_ kinds of template parameters exist?

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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