Boost logo

Boost :

Subject: [boost] [bind] placeholders in namespace ::
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-10-24 18:36:18


Hello all,

Do you know in which namespace Boost.Bind placeholders are actually defined?

#include <boost/bind.hpp>
#include <iostream>

void f ( int a, int b )
{
    std::cout << a << " " << b << std::endl;
}

int main ( )
{
    int x = 10;
    boost::bind(f, 5, ::_1)(x);
    return 0;
}

>From the example above, the docs, and the source code, I am pretty sure
Boost.Bind placeholders are defined in the unnamed namespace :: ... why?
Isn't it a bad practice for a library to pollute the unnamed namespace?

Thanks for the clarification.
--Lorenzo

--
View this message in context: http://boost.2283326.n4.nabble.com/boost-bind-placeholders-in-namespace-tp3934814p3934814.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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