mirror of https://github.com/CGAL/cgal
fix narrowing
This commit is contained in:
parent
c0ec1b96f5
commit
72624bb0f1
|
|
@ -69,7 +69,7 @@ public:
|
||||||
|
|
||||||
template <class T1, class T2, class T3>
|
template <class T1, class T2, class T3>
|
||||||
VectorC3(T1 &&x, T2 &&y, T3 &&z)
|
VectorC3(T1 &&x, T2 &&y, T3 &&z)
|
||||||
: base(Rep{std::forward<T1>(x), std::forward<T2>(y), std::forward<T3>(z)}) {}
|
: base(fwd_make_array<FT_>(std::forward<T1>(x), std::forward<T2>(y), std::forward<T3>(z))) {}
|
||||||
|
|
||||||
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
|
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
|
||||||
: base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
|
: base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,15 @@ make_array(const T & t, const Args & ... args)
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template< typename T, typename... Args >
|
||||||
|
BOOST_CXX14_CONSTEXPR
|
||||||
|
std::array< T, sizeof...(Args) >
|
||||||
|
fwd_make_array(Args && ... args)
|
||||||
|
{
|
||||||
|
std::array< T, sizeof...(Args) > a = { { static_cast<T>(args)... } };
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Functor version
|
// Functor version
|
||||||
struct Construct_array
|
struct Construct_array
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue