Suppose I have two vectors std::vector that I know to be of the same size.
Is there a C++11 paradigm for doing a bitwise-AND<
A lambda should do the trick:
#include
#include
std::transform(a.begin(), a.end(), // first
b.begin(), // second
std::back_inserter(c), // output
[](uint32_t n, uint32_t m) { return n & m; } );
Even better, thanks to @Pavel and entirely C++98:
#include
std::transform(a.begin(), a.end(), b.begin(),
std::back_inserter(c), std::bit_and());