#pragma once template struct cache_pad { template cache_pad(Arg... args) : val(args...) {} operator T () { return val; } T& operator () () { return val; } union { T val; char pad[(sizeof(T) + 63) / 64 * 64]; }; } __attribute__ ((aligned (64))); // TODO: port to C++11 alignas once GCC support is old enough