Use different trait techniques to be compatible with g++