Boost logo

Boost :

From: Gary Powell (powellg_at_[hidden])
Date: 2002-02-19 14:29:47


>>--------------------------------------------
  What I want to be able to do is call bind with the constructor

      bind (Foo::Foo(int), _1);

      bind (Foo::Foo );

      bind (template<class T>Foo::Foo(T&), _1);

But the parsing is horrible. Does the above call the constructor or is it an
identifier? Time for another key word??
<<--------------------------------------------------------

I nominate "addressof()" It says what it means, it isn't used. While it
may conflict with user variable names, all new keywords have this problem.
(Although it reflects my "English" bias.)

    typedef MyType T;

    T t;
    T * pt == addressof(t); // if operator "&" isn't overloaded its
equivalent to &t;
    T::*pmf() == addressof(T::memFn); // same as &T::memFn()
    T::T() constructor == addressof(T::T());
    T::T(int) constructor == addressof(T::T(int));
    T::~T() destructor == addressof(T~T());

    int i;
    int *pi == addressof(i);
    int const *cpi == addressof(const_cast<const int>(i) );

    At the moment I don't see how to store the address of a template, unless
the type is defined. But at least you can identify it.

    If you think that "&T::T(int)" is sufficent that would also be fine with
me.
I'm just more worried about the parsing.

etc.

  Go ahead, flame away.....I'm wearing my nomax underwear.

      -Gary-


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