Blaze  3.6
blaze::IsConvertible< From, To > Struct Template Reference

Compile time pointer relationship constraint.This type traits tests whether the first given template argument can be converted to the second template argument via copy construction. If the first argument can be converted to the second argument, the value member constnt is set to true, the nested type definition type is TrueType, and the class derives from TrueType. Otherwise value is set to false, type is FalseType, and the class derives from FalseType. More...

#include <IsConvertible.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<typename From, typename To>
struct blaze::IsConvertible< From, To >

Compile time pointer relationship constraint.

This type traits tests whether the first given template argument can be converted to the second template argument via copy construction. If the first argument can be converted to the second argument, the value member constnt is set to true, the nested type definition type is TrueType, and the class derives from TrueType. Otherwise value is set to false, type is FalseType, and the class derives from FalseType.

struct A {};
struct B : public A {};
struct C {};
struct D {
D( const C& c ) {}
};
blaze::IsConvertible<B,A>::Type // Results in TrueType
blaze::IsConvertible<B*,A*>::Type // Results in TrueType
blaze::IsConvertible<C,D> // Is derived from TrueType
blaze::IsConvertible<char*,std::string> // Is derived from TrueType
blaze::IsConvertible<A,B>::Type // Results in FalseType
blaze::IsConvertible<A*,B*> // Is derived from FalseType

The documentation for this struct was generated from the following file: