diff --git a/examples/tools/attrs.cc b/examples/tools/attrs.cc index 1211ae1ea7..9d6cf58471 100644 --- a/examples/tools/attrs.cc +++ b/examples/tools/attrs.cc @@ -14,15 +14,14 @@ constexpr auto DEFAULT{MakeAttrs(PopulationSize(100), GenerationLength(100), // Notice that this function has a different ordering than DEFAULT void print( const std::string& name, - const Attrs, DefaultGenomeValue, - GenerationLengthValue>& args) { + const Attrs, DefaultGenomeValue, + GenerationLengthValue>& args) { std::cout << name << " = " << args << std::endl; } -void printSubset( - const std::string& name, - const Attrs, - typename GenerationLength::value_t>& args) { +void printSubset(const std::string& name, + const Attrs, + typename GenerationLength::value_t>& args) { std::cout << name << " = " << args << std::endl; } @@ -43,10 +42,10 @@ int main() { "Using Universal Constructor: ", {PopulationSize(1), DefaultGenome("Hello World"), GenerationLength(50)}); - Attrs, + Attrs, typename DefaultGenome::value_t, // Notice that this will // be auto-converted - typename GenerationLength::value_t> + typename GenerationLength::value_t> user = DEFAULT; // Set a single member user.SetDefaultGenome("ASDEDFDFSA"); diff --git a/source/meta/type_traits.h b/source/meta/type_traits.h index 1d0831b31a..83412f4b9e 100644 --- a/source/meta/type_traits.h +++ b/source/meta/type_traits.h @@ -451,7 +451,7 @@ namespace emp { template class... Cmp> - static constexpr auto variadic_index_of_v{ + static constexpr size_t variadic_index_of_v{ variadic_index_of::value}; namespace __impl_variadics_type_traits { diff --git a/source/tools/attrs.h b/source/tools/attrs.h index c02dd401fb..1a9319cdea 100644 --- a/source/tools/attrs.h +++ b/source/tools/attrs.h @@ -911,7 +911,7 @@ namespace emp { /// of attributes and returns a pack containing each of those attributes. template constexpr Attrs...> MakeAttrs(T&&... props) { - return {std::forward(props)...}; + return Attrs...>(std::forward(props)...); }; namespace __impl_attrs_merge {