coord/ops: disable scalar ops for non-arithmetic types

This commit is contained in:
Danny Robson 2016-05-12 18:22:55 +10:00
parent 56948f9503
commit 3802de5ba3

View File

@ -181,7 +181,9 @@ namespace util {
typename U, \ typename U, \
template <size_t,typename> class K, \ template <size_t,typename> class K, \
typename = std::enable_if_t< \ typename = std::enable_if_t< \
is_coord<K>::value, \ is_coord<K>::value && \
std::is_arithmetic<T>::value && \
std::is_arithmetic<U>::value, \
void \ void \
> \ > \
> \ > \
@ -306,7 +308,11 @@ namespace util {
template < template <
size_t S, size_t S,
typename T, typename T,
typename U typename U,
typename = std::enable_if_t<
std::is_arithmetic<T>::value && std::is_arithmetic<U>::value,
void
>
> >
constexpr constexpr
vector<S,std::common_type_t<T,U>> vector<S,std::common_type_t<T,U>>