Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-07-08 12:58:41


This is what I would like to do:

template <class P1, class P2>
struct sp
{
     template <typename T>
     struct nested { };
};

template <typename T>
struct less;

template <class P1, class P2, typename T>
struct less<sp<P1, P2>::nested<T> >
     : binary_function<...>
{
     bool operator()(...);
};

However, it doesn't work. From my research, it seems that the
problem is that T is in a non-deduced context, but I don't see
why that would be an issue, since this is how I expect it to get
instantiated:

less<sp<p1, p2>::nested<int> > comp;

Thus, I don't see any deduction as being necessary, but obviously
I don't exactly understand how to get what I want.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk