OpenVDB
3.1.0
|
CanConvertType<FromType, ToType>::value is true
if a value of type ToType can be constructed from a value of type FromType.
More...
#include <Types.h>
Public Types | |
enum | { value = boost::is_convertible<FromType, ToType>::value } |
CanConvertType<FromType, ToType>::value is true
if a value of type ToType can be constructed from a value of type FromType.
boost::is_convertible
tests for implicit convertibility only. What we want is the equivalent of C++11's std::is_constructible
, which allows for explicit conversions as well. Unfortunately, not all compilers support std::is_constructible
yet, so for now, types that can only be converted explicitly have to be indicated with specializations of this template.