Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-12 14:08:25

"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>> I'm don't see why you'd need to register operators. If I'm not
>> mistaken, with Arkadiy's solution you only need to register
>> user-defined types and templates (and maybe functions if they are used
>> as template arguments).
> Functions (as well as member functions and data members) are supported by
> the typeof library -- you don't need to register them. This comes from the
> fact that, for example, R(*)(T0, T1) can be applied to any function that
> matches this signature, and only depends on R, T0, and T1.
> So, as long as you register MyType, the following, for example, will be
> handled:
> int (MyType::*)(short&, const MyType&) const //FWIW

It's clearly not a complete solution, then:

  template <int (*)()>
  struct f {};

  int g();
  int h();


That's all I meant about registering functions.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at