Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2000-01-07 23:18:34


scleary_at_[hidden] writes:

[...]

| > | Also, this means "numeric_limits<const int>::is_specialized" is _true_.
| >
| > No, 'const int' isn't a *fundamnetal* type.
| >
|
| Yes, I incorrectly quoted the Standard; as you pointed out, my quotation
| refers only to non-type template parameters. However, I still don't think
| that
|
| template <class T> struct X { };
| template <> struct X<int> { };
| template <> struct X<const int> { };
| X<const int> bob;
|
| will work. In [Deducing template arguments from a type] (14.8.2.4), para 9
| gives us a list of matchable forms, one of which is "cv-list T". I take
| this to mean that "X<const int>" will match both specializations, and
| neither is more specialized than the other, resulting in ambiguity. Is this
| correct?

No. In the example you gave, there is no room for argument-deduction,
thus rules governing argument deduction don't apply.

-- Gaby


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