8 Sep
2020
8 Sep
'20
7:31 p.m.
Andrey Semashev wrote:
Looking at the code, I wonder why there is "using namespace std::placeholders". Shouldn't there be a separate namespace for placeholders? (I also think, it goes against our header policies.)
This imports the placeholders into boost::lambda2. There is no scenario in which you want to make the operators available without the placeholders, so without this directive, you'd always need to use both using namespace boost::lambda2; using namespace std::placeholders; This doesn't help anyone. (Operators belong in the namespace of their arguments to be ADL-reachable, so ideally, they would have been in std::placeholders, but I obviously can't place them there.)