You are viewing a single comment's thread. Return to all comments →
template <bool...digits> int reversed_binary_value(){ bool arr[] = {digits...}; int sum = 0; int a = 0; for(bool i : arr){ sum = sum | ((1&i) << a++); } return sum; }
Seems like cookies are disabled on this browser, please enable them to open this website
C++ Variadics
You are viewing a single comment's thread. Return to all comments →