Boost logo

Boost Users :

From: Ares Lagae (ares.lagae_at_[hidden])
Date: 2007-05-30 02:29:39


Ovanes Markarian wrote:

> Hi!
>
> do you mean this?
>
>
> function_template_wrapper::call<int, function_template<int> >(10);
>

Thanks for the reply, but it's not really what I want.

I need some mechanism to pass a function template, not an instantiation of a
function template.

For example:

template <typename T> void callback() {}

class
{
  // invalid syntax
  //a kind template template parameter of template function type

  template <template <typename T> void (*function_pointer) (T)>
  void set_callback()
  {
    std::tr1::function<void (T1)> f_t1 = &function_pointer<T1>;
    std::tr1::function<void (T2)> f_t2 = &function_pointer<T2>;
    ...
    std::tr1::function<void (Tn)> f_tn = &function_pointer<Tn>;
  }
}

-- 
Ares Lagae
Computer Graphics Research Group, Katholieke Universiteit Leuven
http://www.cs.kuleuven.be/~ares/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net