|
Boost : |
Subject: Re: [boost] GSOC 2010 - BGL Graph Connectives.
From: nguyen vu tri (nvutri_at_[hidden])
Date: 2010-04-12 15:01:47
> If you don't show me what the first idea is, I can't really suggest another
> one :) What are you trying to accomplish, and what exactly did you do?
>
I am sorry for my confusing question. I wrote the template like this:
------------------------------------------------------------------------------
template <> // double
struct Is_Type<double> { static const int value = 0;};
template <> // int
struct Is_Type<int> { static const int value = 1;};
------------------------------------------------------------------------------
And then, I call Is_Type<typename>::value to compare and figure if two
types are different :
------------------------------------------------------------------------------
if ( Is_Type<int>::value == Is_Type<double>::value )
------------------------------------------------------------------------------
However, I think there is a huge number of types. Therefore, this solution
will not be efficient.
I would like to ask if you could suggest me a better way.
Regards,
Tri Nguyen.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk