ruby macro bind conflicts tr1 on msvc9.0

Discussion in 'Ruby' started by Christoph Heindl, Jan 17, 2009.

  1. Hi,

    It seems that the macro bind as defined in trunk/include/ruby/win32.h
    conflicts with added tr1 support to msvc9.0 (which is essentially
    SP1). The conflict arises when <trunk/include/ruby/win32.h> is
    included along with visual studio standard tr1 include <xxbind>

    <trunk/include/ruby/win32.h> defines:

    #ifdef bind
    #undef bind
    #endif
    #define bind(s, a, l) rb_w32_bind(s, a, l)

    <xxbind> has template methods such as
    template<class _Ret,
    class _Fty
    _C_CLASS_ARG0>
    _Bind<_Ret,
    _BINDN<_Callable_obj<_Fty> _C_ARG0_ARG1> >
    bind(_Fty _Val _C_ARG0_A0) // <--- here!
    { // bind to UDT and user-specified return type
    typedef _BINDN<_Callable_obj<_Fty> _C_ARG0_ARG1> _MyBind;
    return (_Bind<_Ret, _MyBind>(_MyBind(_Val _C_A0_A1)));
    }

    Renaming the macro fixed the problem for compiling the ruby wrappers
    I'm working on.

    Any solutions other than renaming are appreciated.

    Best regards,
    Christoph
     
    Christoph Heindl, Jan 17, 2009
    #1
    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. Gert Van den Eynde

    tr1::bind in a template class

    Gert Van den Eynde, Dec 12, 2005, in forum: C++
    Replies:
    2
    Views:
    397
    Pete Becker
    Dec 26, 2005
  2. Emmanuel Deloget
    Replies:
    3
    Views:
    422
    Chris Thomasson
    Mar 3, 2007
  3. Neil Morgenstern
    Replies:
    0
    Views:
    977
    Neil Morgenstern
    Aug 21, 2009
  4. Immortal Nephi
    Replies:
    3
    Views:
    1,386
    Gennaro Prota
    Jul 10, 2010
  5. Trans
    Replies:
    24
    Views:
    334
    David A. Black
    Oct 23, 2007
Loading...

Share This Page