From 86116a9456fc1b4166592cd270b4adc1a03343ae Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 2 Oct 2023 08:22:19 +0200 Subject: [PATCH] Try to fix StaticMap build on Win --- src/libslic3r/StaticMap.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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}; }