|
Boost : |
Subject: Re: [boost] [Polygon] "Ambiguous use of partial specialization" in CodeWarrior
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2010-01-08 14:33:30
Kef Schecter wrote:
> I'm using a special version of CodeWarrior for an embedded system,
> but I suspect that other versions of the software will show the
> problem. The problem is, basically, the compiler hates
> polygon_traits<T>. Here's an example from polygon_90_set_traits.hpp:
>
> template <typename T>
> struct traits_by_concept<T, polygon_90_concept> {
> typedef polygon_traits<T> type;
> };
>
> It chokes on the typedef, saying "Ambiguous use of partial
> specialization". This is the complete text of the error message; it
> provides no other information.
Does anyone know how well CodeWarrior supports SFINE in the context of instantiating a template struct? I have several partial specializations of polygon_traits and I use SFINAE in the 2nd template parameter to select between them based on the concept type of the 1st template parameter. This glues the whole polygon typesystem together and provides the mappings between concepts and their refinements.
Based on a quick search I found this comment:
"
Not AFAICT; I tried that. Also, the use of enable_if in the iterators
library proves that inheritance doesn't hurt CWPro8. It looks to me
like on CWPro8, SFINAE is only good for eliminating overloads, and
the other uses fail.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
"
Kef, what version of CodeWarrior does your special version derive from?
Thanks,
Luke
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk