I know set() function for a already constructed bitset object, but I need a constructed bitset which all bits are 1. The situation is a default function parameter. for example:
void bar(std::bitset<100> flags = X) {
}
what X should be, -1 may works for first 64 bits, but not all.
You can use
std::bitset<100> = std::bitset<100>(std::string(100, '1'))but it's a bit ugly imo