I have a function that creates a std::bitset
, whose length is a constant function parameter. It doesn't work because the constant isn't an "integral constant expression". Is there any way I can make this work?
For reference:
void Foo(const std::string &data, const unsigned int size) {
std::bitset<size> Bar(data);
// Do something
return;
}