geom/ops: remove point-point distance via sfinae
point-point distance is already defined outside of the geom namespace
This commit is contained in:
parent
a8b3737b8b
commit
87d442772c
12
geom/ops.hpp
12
geom/ops.hpp
@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright 2015 Danny Robson <danny@nerdcruft.net>
|
* Copyright 2015-2018 Danny Robson <danny@nerdcruft.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __UTIL_GEOM_OPS_HPP
|
#ifndef __UTIL_GEOM_OPS_HPP
|
||||||
@ -20,6 +20,8 @@
|
|||||||
#include "./fwd.hpp"
|
#include "./fwd.hpp"
|
||||||
#include "../point.hpp"
|
#include "../point.hpp"
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
namespace util::geom {
|
namespace util::geom {
|
||||||
@ -41,11 +43,17 @@ namespace util::geom {
|
|||||||
T
|
T
|
||||||
distance2 (A<S,T>, B<S,T>);
|
distance2 (A<S,T>, B<S,T>);
|
||||||
|
|
||||||
|
// disable distance for point-point arguments given it's already
|
||||||
|
// explicitly specified in the point header.
|
||||||
template <
|
template <
|
||||||
size_t S,
|
size_t S,
|
||||||
typename T,
|
typename T,
|
||||||
template <size_t,typename> class A,
|
template <size_t,typename> class A,
|
||||||
template <size_t,typename> class B
|
template <size_t,typename> class B,
|
||||||
|
typename = std::enable_if_t<
|
||||||
|
!std::is_same_v<util::point<S,T>, A> &&
|
||||||
|
!std::is_same_v<util::point<S,T>, B>
|
||||||
|
>
|
||||||
>
|
>
|
||||||
T
|
T
|
||||||
distance (A<S,T>, B<S,T>);
|
distance (A<S,T>, B<S,T>);
|
||||||
|
Loading…
Reference in New Issue
Block a user