diff --git a/src/libslic3r/StaticMap.hpp b/src/libslic3r/StaticMap.hpp index 0ef6c840d3..84054dda32 100644 --- a/src/libslic3r/StaticMap.hpp +++ b/src/libslic3r/StaticMap.hpp @@ -258,8 +258,14 @@ public: // e.g.: auto map = make_staticmap({ {"one", 1}, {"two", 2}}) // will work, and only the key and value type needs to be specified. No need // to state the number of elements, that is deduced automatically. -template> -constexpr auto make_staticmap(const SMapEl (&arr) [N], Cmp cmp = {}) +template +constexpr auto make_staticmap(const SMapEl (&arr) [N]) +{ + return StaticMap{static_set_detail ::to_array(arr), DefaultCmp{}}; +} + +template +constexpr auto make_staticmap(const SMapEl (&arr) [N], Cmp cmp) { return StaticMap{static_set_detail ::to_array(arr), cmp}; }