On Jan 23, 2008 9:22 AM, Roy Stogner <[EMAIL PROTECTED]> wrote:
> The fix looks simple enough (we ought to be explicitly using
> std::complex<T>::real()), but I'm not sure of the cleanest way to do
> it in standard C++. You can't partially specialize one method or two
> in a templated class without redundantly declaring a specialized
> version of the whole class? Seriously?
Sure you can... I do it with some of my classes in my code like this....
In something.h:
template<class T>
class Something
{
T doSomething();
};
template<>
double Something<double>::doSomething();
template<>
std::vector<double> Something<std::vector<double> >::doSomething();
Then in something.C:
template<>
double Something<double>::doSomething(){ stuff...; return double }
template<>
std::vector<double> Something<std::vector<double> >::doSomething() {
stuff...; return std::vector<double> }
Derek
> ---
> Roy
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Libmesh-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel