4#ifndef _aspose_system_constrains_h_
5#define _aspose_system_constrains_h_
7#include <system/shared_ptr.h>
8#include <system/weak_ptr.h>
11namespace System {
namespace Constraints {
14template <
class Base,
class Derived>
15struct IsBaseOf : std::is_base_of<Base, Derived> {};
18template <
class Base,
class Derived>
22template <
class Base,
class Derived>
26template <
typename T,
typename =
void>
62struct IsStdTuple<std::tuple<T>> : std::true_type {};
73namespace System {
namespace Constraints {
85#define assert_is_base_of(Base, Derived) \
86 static_assert(System::Constraints::IsBaseOf<Base, Derived>::value, "typename " #Derived " must be child of " #Base)
90#define assert_is_constructable(T) \
91 static_assert(System::Constraints::IsDefaultConstructible<T>::value, "typename " #T " must be default-constructible")
95#define assert_is_cs_class(T) \
96 static_assert(System::Constraints::IsCsPointer<T>::value, \
97 "typename " #T " must be System::SharedPtr<> or 'force-valued' type")
101#define assert_is_cs_struct(T) \
102 static_assert(!System::Constraints::IsCsPointer<T>::value, \
103 "typename " #T " must not be System::SharedPtr<> or 'force-valued' type")
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a time interval. This type should be allocated on stack and passed to functions by value o...
Definition: timespan.h:59
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: weak_ptr.h:18
Definition: db_command.h:9
@ DateTime
A type representing a date and time value.
A template predicate that determines if type Derived is derived from Base.
Definition: constraints.h:15
A template predicate that determines if the specified type is a pointer type. By default any type is ...
Definition: constraints.h:44
A template predicate that determines if type T is default constructible.
Definition: constraints.h:35
Implementation that checks whether type is default constructible or not.
Definition: constraints.h:27
A template predicate that determines if the specified type is a tuple type.
Definition: constraints.h:58