You are viewing a single comment's thread. Return to all comments →
template<bool...bits> int reversed_binary_value(){ bool binary[] = {bits...}; int dec = 0, base = 1; for(bool bit : binary){ dec += bit*base; base*=2; } return dec; }
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 →