Skip to content

Commit

Permalink
Update xtype_traits.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
spectre-ns authored Dec 10, 2023
1 parent 7b9f7bb commit 2c5e10c
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 2c5e10c

Please sign in to comment.