From: Mathias Gaunard on
On Dec 4, 4:13 pm, piwi <bruno.lemarch...(a)gmail.com> wrote:
> Hello, I have an issue when performing partial specializing of a
> template function.

You can't.
Use SFINAE instead, it's basically the same thing.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Jesse Perla on
On Dec 7, 2:53 pm, piwi <bruno.lemarch...(a)gmail.com> wrote:
> looking for, but that's true it may lead to ambiguities. About using
> boost, because my code is integrated into a large software framework,
> I'm unfortunately not allowed to use it, so enable_if is not an
> alternative in my situation.

As Mathias says, "enable_if" is just a consistent way to use SFINAE.
The code has no real boost dependencies and you could copy or write it
yourself easily. On the other hand, it isn't all that useful without
some type traits libraries which you don't want to write yourself. If
you are able to use TR1 (for example, with Visual Studio 2008 SP1),
then you can get the standard type traits without any external library
dependencies. Worst case, you could also copy/paste any type traits
code you need as it is mostly self-contained (though often compiler
dependent).


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]