Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby macro bind conflicts tr1 on msvc9.0

Reply
Thread Tools

ruby macro bind conflicts tr1 on msvc9.0

 
 
Christoph Heindl
Guest
Posts: n/a
 
      01-17-2009
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro function conflicts namespace function? Immortal Nephi C++ 3 07-10-2010 01:23 PM
Problems with tr1::bind and reference to abstract class Neil Morgenstern C++ 0 08-21-2009 03:22 PM
Continuing my foray into the TR1: tr1::shared_ptr<> Emmanuel Deloget C++ 3 03-03-2007 03:11 PM
tr1::bind in a template class Gert Van den Eynde C++ 2 12-26-2005 01:26 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57