functor - accessing bound parameter

  • suresh easwar
    suresh easwar

    I have a need to access the parameter bound to a functor, but am unable to do so. Here is the problem:

    I need to store objects of type Functor<void, TYPELIST_1(SomeClass)> in a priority queue. Th e queue  must be able to store objects for different SomeClass types at the same time. In order to achieve this, I create a priority queue that stores objects of type Functor<void>. Next, I bind the SomeClass parameter to the functor which results in a new functor of type Functor<void, NullType>. Now I am able to store the resulting functor in the queue. The problem is that to compute the priority for the queue, I need to access the bound parameter as it contains the necessary info.

    Any suggestions?