region: remove two-scalar constructor

two-scalar constructor is too similar to extent and point constructors
leading to unexpected initialisation problems.
This commit is contained in:
Danny Robson 2015-04-02 14:58:43 +11:00
parent 0211ed5b37
commit 426fc1c848
2 changed files with 3 additions and 13 deletions

View File

@ -65,15 +65,6 @@ util::region<S,T>::region (std::array<T,S*2> args)
std::copy (&args[S], &args[S*2], e.data);
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::region<S,T>::region (position_type _p,
size_type _e):
region (point_t {_p}, extent_t {_e})
{
debug::sanity (*this);
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
@ -361,14 +352,14 @@ util::region<S,T>::operator== (region rhs) const
template <size_t S, typename T>
const util::region<S,T>
util::region<S,T>::MAX (
std::numeric_limits<T>::lowest () / 2,
std::numeric_limits<T>::max ()
util::point<S,T> {std::numeric_limits<T>::lowest () / 2},
util::extent<S,T> {std::numeric_limits<T>::max ()}
);
template <size_t S, typename T>
const util::region<S,T>
util::region<S,T>::UNIT ({0}, {1});
util::region<S,T>::UNIT (util::point<S,T>{0}, util::extent<S,T>{1});
//-----------------------------------------------------------------------------

View File

@ -69,7 +69,6 @@ namespace util {
region (point_t, extent_t);
region (point_t, point_t);
region (std::array<T,S*2>);
region (position_type, size_type);
//---------------------------------------------------------------------
size_type area (void) const;