boost:::bind problem syntax error with redefined new

Discussion in 'C++' started by kittymaguire, Aug 18, 2008.

  1. kittymaguire

    kittymaguire Guest

    I am using VC2005 and have refined new to be new
    (_NORMAL_BLOCK ,__FILE__, __LINE__) for the debug build so that the
    location of memory leaks are reported.

    The problem that I have is when, I try to bind a functor using
    boost::bind

    boost::bind(&BoostWorkerThread::Stop, this)

    I get an syntax error in function_template.hpp '('

    assign_functor(FunctionObj f, function_buffer& functor, mpl::true_)
    {
    new ((void*)&functor.data) FunctionObj(f);
    }

    if I do not refined new, then there is no compile error.
    Question, how can I redefine new and still use boost.
     
    kittymaguire, Aug 18, 2008
    #1
    1. Advertising

  2. On Mon, 18 Aug 2008 10:51:48 +0200, kittymaguire
    <> wrote:

    > boost::bind(&BoostWorkerThread::Stop, this)



    boost::bind(&BoostWorkerThread::Stop, this,_1);
     
    David Côme, Aug 18, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Toby Bradshaw
    Replies:
    6
    Views:
    1,818
    Kai-Uwe Bux
    Jun 2, 2006
  2. Replies:
    0
    Views:
    614
  3. Christopher
    Replies:
    1
    Views:
    862
    Yakov Gerlovin
    Oct 5, 2011
  4. MiG
    Replies:
    8
    Views:
    163
    Ryan Leavengood
    Oct 19, 2005
  5. Mark
    Replies:
    1
    Views:
    470
    Jeff Flinn
    Nov 25, 2012
Loading...

Share This Page