Skip to content

Commit

Permalink
Merge pull request #274 from spectre-ns/patch-1
Browse files Browse the repository at this point in the history
Resolve issue promoting multiple std::complex
  • Loading branch information
JohanMabille authored Dec 11, 2023
2 parents 7b9f7bb + 2c5e10c commit ae017d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/xtl/xtype_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ namespace xtl
using type = typename promote_type<T, typename promote_type<REST...>::type>::type;
};

template <class T0, class T1, class... REST>
struct promote_type<std::complex<T0>, std::complex<T1>, REST...>
{
using type = std::complex<typename promote_type<T0, T1, REST...>::type>;
};

/**
* Abbreviation of 'typename promote_type<T>::type'.
*/
Expand Down

0 comments on commit ae017d5

Please sign in to comment.