move weight set type trait to traits.hpp