#include <CGAL/Coercion_traits.h>
#include <CGAL/IO/io.h>
template <typename A, typename B>
binary_func(const A& a , const B& b){
static_assert(CT::Are_explicit_interoperable::value);
typename CT::Cast cast;
return cast(a)*cast(b);
}
int main(){
std::cout<< binary_func(double(3), int(5)) << std::endl;
std::cout<< binary_func(int(3), double(5)) << std::endl;
return 0;
}
An instance of Coercion_traits reflects the type coercion of the types A and B, it is symmetric in th...
Definition: Coercion_traits.h:15