unsigned int operator "" _b(const char* col, size_t n)
{
unsigned int result = 0;
int t;
for (int i = 0; i < n; i++) {
t = (col[n - 1 - i] - 0x30);
if (t != 0 && t != 1) throw std::string("literal error");
result+=t*pow(2, i);
}
return result;
}
int main(int argc)
{
int a = 0;
try {
cout << "11111111"_b << endl;
}
catch (std::string errinfo) {
cout << errinfo;
}
cin >> a;
return 0;
}