Skip to content

Commit

Permalink
Add a specialization of mp_from_sequence_impl to handle the defaulted…
Browse files Browse the repository at this point in the history
… offset case. Fixes #103.
  • Loading branch information
pdimov committed Jan 7, 2025
1 parent e2277a5 commit 7ca1e0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/boost/mp11/algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ template<template<class T, T... I> class S, class U, U... J, class F> struct mp_
using type = mp_list_c<U, (F::value + J)...>;
};

template<template<class T, T... I> class S, class U, U... J> struct mp_from_sequence_impl<S<U, J...>, mp_int<0>>
{
using type = mp_list_c<U, J...>;
};

} // namespace detail

template<class S, class F = mp_int<0>> using mp_from_sequence = typename detail::mp_from_sequence_impl<S, F>::type;
Expand Down

0 comments on commit 7ca1e0a

Please sign in to comment.