Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: dkaparis on October 09, 2010, 01:25:48 PM



Title: bind problems with c++ 0x
Post by: dkaparis on October 09, 2010, 01:25:48 PM
The unqualified bind references in main.cpp and util.cpp are ambiguous for newer compilers that implement the upcoming ISO standard: there is a collision between boost::bind and std::(tr1::)::bind. This breaks the build under, e.g. VC++ 2010.

I've qualified the offending references and fixed the build here (http://bitbucket.org/dkaparis/bitcoin-cmake/changeset/74bd4461ff9b), but this is precisely the reason why using-directives in header files are widely considered a bad practice. Better to do away with the using-directives in headers.h and either qualify all references, or judiciously use typedefs and/or using-declarations throughout the sources. If Satoshi gives a green light for this, I'd make another patch along these lines.


Title: Re: bind problems with c++ 0x
Post by: LZ on October 17, 2010, 01:51:51 AM
Fixed in SVN revision 164.