This header declares utility functions to build objects handling any exception thrown by a constructor.
More...
|
| #define | MGIS_CONSTRUCT(Type, e, ...) ::mgis::construct<Type>(e, __VA_ARGS__) |
| | a simple wrapper around the construct function which handles the declaration of the source location if needed
|
| |
| #define | MGIS_MAKE_UNIQUE(Type, e, ...) ::mgis::make_unique<Type>(e, __VA_ARGS__) |
| | a simple wrapper around the make_unique function which handles the declaration of the source location if needed.
|
| |
| #define | MGIS_MAKE_UNIQUE_AS(BaseType, Type, e, ...) ::mgis::make_unique_as<BaseType, Type>(e, __VA_ARGS__) |
| | a simple wrapper around the make_unique_as function which handles the declaration of the source location if needed
|
| |
| #define | MGIS_MAKE_SHARED_AS(BaseType, Type, e, ...) ::mgis::make_shared_as<BaseType, Type>(e, __VA_ARGS__) |
| | a simple wrapper around the make_shared_as function which handles the declaration of the source location if needed.
|
| |
| #define | MGIS_MAKE_SHARED(Type, e, ...) ::mgis::make_shared<Type>(e, __VA_ARGS__) |
| | a simple wrapper around the make_shared function which handles the declaration of the source location if needed
|
| |
| #define | MGIS_TRY_CONSTRUCT(Type, v, e, ...) |
| | an helper macro to build a variable the constructor of which may throw
|
| |
| #define | MGIS_TRY_MAKE_UNIQUE(Type, v, e, ...) |
| | an helper macro to build an unique pointer for type the constructor of which may throw
|
| |
| #define | MGIS_TRY_MAKE_UNIQUE_AS(BaseType, Type, v, e, ...) |
| | an helper macro to build an unique pointer for type the constructor of which may throw
|
| |
| #define | MGIS_TRY_MAKE_SHARED(Type, v, e, ...) |
| | an helper macro to build an shared pointer for type the constructor of which may throw
|
| |
| #define | MGIS_TRY_MAKE_SHARED_AS(BaseType, Type, v, e, ...) |
| | an helper macro to build an shared pointer for type the constructor of which may throw
|
| |
|
template<typename Type , typename... ArgumentsTypes>
requires std::is_constructible_v<std::remove_const_t<Type>, ArgumentsTypes...> |
| std::optional< Type > | mgis::construct (Context &, ArgumentsTypes &&...) noexcept |
| | try to build an object of the given type.
|
| |
template<typename Type , typename... ArgumentsTypes>
requires std::is_constructible_v<std::remove_const_t<Type>, ArgumentsTypes...> |
| std::unique_ptr< Type > | mgis::make_unique (Context &, ArgumentsTypes &&...) noexcept |
| | try to build a unique pointer holding the given type.
|
| |
template<typename BaseType , typename Type , typename... ArgumentsTypes>
requires std::is_base_of_v<BaseType, Type> && std::is_constructible_v<std::remove_const_t<Type>, ArgumentsTypes...> |
| std::unique_ptr< BaseType > | mgis::make_unique_as (Context &, ArgumentsTypes &&...) noexcept |
| | try to build a unique pointer of a base type holding the given type.
|
| |
template<typename Type , typename... ArgumentsTypes>
requires std::is_constructible_v<std::remove_const_t<Type>, ArgumentsTypes...> |
| std::shared_ptr< Type > | mgis::make_shared (Context &, ArgumentsTypes &&...) noexcept |
| | try to build a shared pointer holding the given type.
|
| |
template<typename BaseType , typename Type , typename... ArgumentsTypes>
requires std::is_base_of_v<BaseType, Type> && std::is_constructible_v<std::remove_const_t<Type>, ArgumentsTypes...> |
| std::shared_ptr< BaseType > | mgis::make_shared_as (Context &, ArgumentsTypes &&...) noexcept |
| | try to build a shared pointer of a base type holding the given type.
|
| |
This header declares utility functions to build objects handling any exception thrown by a constructor.
- Date
- 06/11/2022