C++11 brace initialization lets you create a zero of any integral type, if that type has a single identifier, like uint32_t. For unsigned int you'd need a type alias. You can then invert all bits via ~.
auto flags = ~ uint32_t{};
using my_flag_type = unsigned int;
auto flags = ~ my_flag_type{};