[ create a new paste ] login | about

Link: http://codepad.org/rQd5oeoV    [ raw code | fork ]

C++, pasted on Jun 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// showing only metafunction result_from_distance
template <typename Point1, typename Point2, typename typename CalculationType>
struct result_from_distance<strategy::distance::comparable::pythagoras<Point1, Point2, CalculationType> >
{
private :
    typedef strategy::distance::comparable::pythagoras<Point1, Point2, CalculationType> this_type;
public :
    template <typename T>
    static inline typename this_type::return_type apply(T const& value)
    {
        typename this_type::return_type const v = value;
        return v * v;
    }
};


Create a new paste based on this one


Comments: