Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-03-24 17:38:11


This isn't a boost problem so it really belongs elsewhere.

Davi de Castro Reis <davicastro_at_[hidden]> writes:

> I am trying to specialize some (non-trivial) function templates, but I
> am getting a lot of unexpected compile errors.

> //"template function" partial specialization
> template<class X, class U>
> void f(int a, U b) {}
>
Unfortunately there's no function template partial specialization in
C++.

You can try to write an overload and let partial ordering choose it:

  template<class U>
  void f(int a, U b) {}

HTH,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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