CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::detail::is_pointer_convertible< from, to > Struct Template Reference

Checks if pointers are implicitly convertible. Workaround for VS implementation of std::is_convertible which instantiates all pointed types to full extent. More...

#include <detail.h>

Public Types

using type = decltype(check(std::declval< from * >()))
 Either true_type or false_type, defining whether the implicit conversion is possible. More...
 

Static Public Member Functions

static std::true_type check (to *)
 SFINAE stub for possible conversions. More...
 
static std::false_type check (...)
 SFINAE stub for impossible conversions. More...
 

Detailed Description

template<typename from, typename to>
struct System::detail::is_pointer_convertible< from, to >

Checks if pointers are implicitly convertible. Workaround for VS implementation of std::is_convertible which instantiates all pointed types to full extent.

Template Parameters
fromSource pointed type.
toDestination pointed type.

Member Typedef Documentation

◆ type

template<typename from , typename to >
using System::detail::is_pointer_convertible< from, to >::type = decltype(check(std::declval<from*>()))

Either true_type or false_type, defining whether the implicit conversion is possible.

Member Function Documentation

◆ check() [1/2]

template<typename from , typename to >
static std::false_type System::detail::is_pointer_convertible< from, to >::check (   ...)
static

SFINAE stub for impossible conversions.

◆ check() [2/2]

template<typename from , typename to >
static std::true_type System::detail::is_pointer_convertible< from, to >::check ( to *  )
static

SFINAE stub for possible conversions.