CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
boxable_traits.h
1
2#pragma once
3
4#include <type_traits>
5#include "defines.h"
6
7namespace System
8{
9 class String;
10 class TypeInfo;
11
14 template <typename T>
15 struct IsBoxable : std::integral_constant<bool,
16 std::is_base_of<Details::BoxableObjectBase, T>::value || std::is_arithmetic<T>::value || std::is_enum<T>::value> {};
17
20 template<> struct IsBoxable<String> : std::true_type {};
22
25 template<> struct IsBoxable<TypeInfo> : std::true_type {};
27}
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
@ TypeInfo
Specifies that the member is a type.
Definition: db_command.h:9
Template predicate that checks if boxing of the specified type is supported.
Definition: boxable_traits.h:16