Rearrange bitbases C++11 way