Skip to content

Commit

Permalink
Simplify apply_type_list to not use a lambda to fix windows builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Oct 25, 2024
1 parent ea59ad2 commit 7e21df0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions src/variant/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ using concat_type_lists = typename _concat_type_lists<Ls...>::type;


template<template<typename...> typename Template, typename TypeList>
using apply_type_list = decltype([]<typename... Ts>(type_list<Ts...>)
-> Template<Ts...>
{
return std::declval<Template<Ts...>>();
}(TypeList{}));
struct _apply_type_list;

template<template<typename...> typename Template, typename... Ts>
struct _apply_type_list<Template, type_list<Ts...>> {
using type = Template<Ts...>;
};

template<template<typename...> typename Template, typename TypeList>
using apply_type_list = typename _apply_type_list<Template, TypeList>::type;


template<typename T, typename... Ts>
Expand Down

0 comments on commit 7e21df0

Please sign in to comment.