4#ifndef _aspose_system_constrains_h_
5#define _aspose_system_constrains_h_
7#include <system/shared_ptr.h>
8#include <system/weak_ptr.h>
9#include <system/boxable_traits.h>
12namespace System {
namespace Constraints {
15template <
class Base,
class Derived>
16struct IsBaseOf : std::is_base_of<Base, Derived> {};
19template <
class Base,
class Derived>
23template <
class Base,
class Derived>
27template <
typename T,
typename =
void>
63struct IsStdTuple<std::tuple<T>> : std::true_type {};
74namespace System {
namespace Constraints {
86#define assert_is_base_of(Base, Derived) \
87 static_assert(System::Constraints::IsBaseOf<Base, Derived>::value || System::BoxedValueDetail::ImplementsInterface_v<Derived, Base>, "typename " #Derived " must be child of " #Base)
91#define assert_is_constructable(T) \
92 static_assert(System::Constraints::IsDefaultConstructible<T>::value, "typename " #T " must be default-constructible")
96#define assert_is_cs_class(T) \
97 static_assert(System::Constraints::IsCsPointer<T>::value, \
98 "typename " #T " must be System::SharedPtr<> or 'force-valued' type")
102#define assert_is_cs_struct(T) \
103 static_assert(!System::Constraints::IsCsPointer<T>::value, \
104 "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:125
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:16
A template predicate that determines if the specified type is a pointer type. By default any type is ...
Definition: constraints.h:45
A template predicate that determines if type T is default constructible.
Definition: constraints.h:36
Implementation that checks whether type is default constructible or not.
Definition: constraints.h:28
A template predicate that determines if the specified type is a tuple type.
Definition: constraints.h:59