From 7231f9f29354fa79488005e6817ef5f64c32a530 Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Fri, 25 Oct 2024 13:47:45 +0200 Subject: [PATCH] Simplify apply_type_list to not use a lambda to fix windows builds. --- .github/workflows/build.yml | 2 +- src/variant/traits.h | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1c8dc1..123fbbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest] steps: - name: Checkout repository diff --git a/src/variant/traits.h b/src/variant/traits.h index beb53b0..f856c0c 100644 --- a/src/variant/traits.h +++ b/src/variant/traits.h @@ -105,11 +105,15 @@ using concat_type_lists = typename _concat_type_lists::type; template typename Template, typename TypeList> -using apply_type_list = decltype([](type_list) - -> Template -{ - return std::declval>(); -}(TypeList{})); +struct _apply_type_list; + +template typename Template, typename... Ts> +struct _apply_type_list> { + using type = Template; +}; + +template typename Template, typename TypeList> +using apply_type_list = typename _apply_type_list::type; template