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.

View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at