MT Core (C++)
Core library for replacing C++ standard in project usage
|
Type traits (aka. More...
Concepts | |
concept | mtcore::Ostreamable |
The Ostreamable trait for types Something that implements this trait allows ostream operations. | |
concept | mtcore::Addressable |
The Addressable trait for types Something that implements this trait allows addressing items by index. | |
concept | mtcore::MutableAddressable |
The Addressable trait for types Something that implements this trait allows addressing items by index. | |
concept | mtcore::Iterator |
The Addressable trait for types Something that implements this trait allows addressing items by index. | |
concept | mtcore::Iterable |
The Iterable trait for types Something that implements this trait can give an iterator to iterate over the elements. | |
concept | mtcore::StdIterable |
Detect if something is C++ standard iterable. | |
concept | mtcore::DefaultDeinit |
Represents a type that has a default (no allocator) deinit method. | |
concept | mtcore::AllocatorDeinit |
Represents a type that has a deinit which takes an allocator (usually does memory cleanup) | |
concept | mtcore::ResultLike |
Represents a type that fulfills the "result" contract. | |
concept | mtcore::ResultLikeWithValue |
Represents a type that fulfills the "result" contract while having a success value of a specific type Does NOT check the error value (the error can be of any type) | |
concept | mtcore::ResultLikeWithVoid |
Represents a type that fulfills the "result" contract while having no success value Does NOT check the error value (the error can be of any type) | |
concept | mtcore::WriterImpl |
Represents an implementation of a writer (basically checks if the type can be wrapped with Writer<>) | |
concept | mtcore::WriterImplBytes |
Represents an implementation of a writer that we can get how many bytes were written. | |
concept | mtcore::WriterImplWritten |
Represents an implementation of a writer that we can get the output. | |
concept | mtcore::WriterImplResettable |
Represents an implementation of a writer that we can reset. | |
concept | mtcore::ReaderImpl |
Represents an implementation of a reader (basically checks if the type can be wrapped with Reader<>) | |
concept | mtcore::Formattable |
Represents a type that can be formatted. | |
concept | mtcore::thread::SelectOption |
Checks if something qualifies as an option to a select statement Allows defining custom options and cases. | |
concept | mtcore::thread::Closeable |
Checks if something is closeable (e.g. | |
concept | mtcore::thread::Sender |
Checks if messages can be sent to something (e.g. | |
concept | mtcore::thread::Receiver |
Checks if messages can be received from something (e.g. | |
concept | mtcore::thread::SenderBlock |
Checks if messages can be sent in a blocking manner. | |
concept | mtcore::thread::ReceiverBlock |
Checks if messages can be received in a blocking manner. | |
concept | mtcore::thread::SenderBefore |
Checks if messages can be sent in a blocking manner with a timeout. | |
concept | mtcore::thread::ReceiverBefore |
Checks if messages can be received in a blocking manner with a timeout. | |
concept | mtcore::thread::SenderGrow |
Checks if messages can be sent to something (e.g. | |
concept | mtcore::thread::SenderBlockGrow |
Checks if messages can be sent to something (e.g. | |
concept | mtcore::thread::SenderBeforeGrow |
Checks if messages can be sent to something (e.g. | |
concept | mtcore::thread::HasClosedError |
Checks if an error type has a "Has Closed" error called CHANNEL_CLOSED. | |
concept | mtcore::thread::SenderReceiver |
Checks if non-blocking sends and receives are supported. | |
concept | mtcore::thread::SenderReceiverBlock |
Checks if blocking sends and receives are supported. | |
concept | mtcore::thread::SenderReceiverBefore |
Checks if blocking with timeout sends and receives are supported. | |
concept | mtcore::thread::SenderReceiverGrow |
Checks if non-blocking sends and receives are supported with allocation to grow. | |
concept | mtcore::thread::SenderReceiverBlockGrow |
Checks if blocking sends and receives are supported with allocation to grow. | |
concept | mtcore::thread::SenderReceiverBeforeGrow |
Checks if blocking with timeout sends and receives are supported with allocation to grow. | |
concept | mtcore::thread::ChannelLike |
Checks if something qualifies as a channel Channels can: | |
concept | mtcore::thread::ChannelLikeGrow |
Checks if something qualifies as a growing channel Growing channels can: | |
Variables | |
template<typename T, typename V> | |
constexpr bool | mtcore::is_result_with_value = impl::IsResultWithValue<V, T>::value |
Checks if a type is result-like with a success value type. | |
template<typename T> | |
constexpr bool | mtcore::is_result_void = impl::IsResultWithValue<void, T>::value |
Checks if a type is result-like with no success value. | |
template<typename T> | |
constexpr bool | mtcore::is_addressable = impl::IsAddressable<T>::value |
Boolean check for if something has the trait Addressable. | |
template<typename T> | |
constexpr bool | mtcore::is_mutable_addressable = impl::IsAddressable<T>::value |
Boolean check for if something has the trait Addressable. | |
template<typename T> | |
constexpr bool | mtcore::is_ostreamable = impl::IsOstreamable<T>::value |
Boolean check for if something has the trait Iterator. | |
template<typename T> | |
constexpr bool | mtcore::is_iterator = impl::IsIterator<T>::value |
Boolean check for if something has the trait Iterator. | |
template<typename T> | |
constexpr bool | mtcore::is_flushable = impl::IsFlushable<T>::value |
Boolean check for if something has the trait Flushable. | |
template<typename T> | |
constexpr bool | mtcore::is_allocator_deinit = impl::IsAllocatorDeinit<T>::value |
Checks if a type requires an allocator to deinit. | |
template<typename T, typename... Args> | |
constexpr bool | mtcore::is_initable = impl::IsInitable<T, Args...>::value |
Checks if a type has an init with the param types. | |
template<typename T> | |
constexpr bool | mtcore::is_formattable = impl::IsFormattable<T>::value |
Checks if a type has a zero-parameter deinit. | |
template<typename T> | |
constexpr bool | mtcore::is_default_deinit = impl::IsDefaultDeinit<T>::value |
Checks if a type has a zero-parameter deinit. | |
template<typename T> | |
constexpr bool | mtcore::thread::has_closed_error = impl::IsHasClosedError<T>::value |
Checks if an error type has a recognized closed error. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_closeable = impl::IsCloseable<T>::value |
Checks if a type is closeable. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender = impl::IsSender<T>::value |
Checks if a type can be sent to. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_grow = impl::IsSenderGrow<T>::value |
Checks if a type can be sent to with growing. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_block = impl::IsSenderBlock<T>::value |
Checks if a type can be sent to (blocking) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_block_grow = impl::IsSenderBlockGrow<T>::value |
Checks if a type can be sent to (blocking) with growing. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_before = impl::IsSenderBefore<T>::value |
Checks if a type can be sent to (blocking, timeout) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_before_grow = impl::IsSenderBeforeGrow<T>::value |
Checks if a type can be sent to (blocking, timeout) with growing. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_receiver = impl::IsReceiver<T>::value |
Checks if a type can be received from. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_receiver_block = impl::IsReceiverBlock<T>::value |
Checks if a type can be received from (blocking) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_receiver_before = impl::IsReceiverBefore<T>::value |
Checks if a type can be received from (blocking, timeout) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver = impl::IsSenderReceiver<T>::value |
Checks if a type can be sent to and received from. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver_grow = impl::IsSenderReceiverGrow<T>::value |
Checks if a type can be sent to and received from with growing send. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver_block = impl::IsSenderReceiverBlock<T>::value |
Checks if a type can be sent to and received from (blocking) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver_block_grow = impl::IsSenderReceiverBlockGrow<T>::value |
Checks if a type can be sent to and received from (blocking) with growing send. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver_before = impl::IsSenderReceiverBefore<T>::value |
Checks if a type can be sent to and received from (blocking, timeout) | |
template<typename T> | |
constexpr bool | mtcore::thread::is_sender_receiver_before_grow = impl::IsSenderReceiverBeforeGrow<T>::value |
Checks if a type can be sent to and received from (blocking, timeout) with growing send. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_channel_like = impl::IsChannelLike<T>::value |
Checks if a type is channel-like. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_channel_like_grow = impl::IsChannelLikeGrow<T>::value |
Checks if a type is growing channel-like. | |
template<typename T> | |
constexpr bool | mtcore::thread::is_select_option = impl::IsSelectOption<T>::value |
Checks if a type can be used in a select statement as an option. | |
Type traits (aka.
C++ concepts) describing what types can and cannot do. Can be used to specify constraints on template parameters
|
constexpr |
Checks if an error type has a recognized closed error.
T | Type to check |
Definition at line 259 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Boolean check for if something has the trait Addressable.
Definition at line 371 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type requires an allocator to deinit.
Definition at line 406 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type is channel-like.
T | Type to check |
Definition at line 395 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type is growing channel-like.
T | Type to check |
Definition at line 403 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type is closeable.
T | Type to check |
Definition at line 267 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type has a zero-parameter deinit.
Definition at line 427 of file core/mtcore/traits.hpp.
|
constexpr |
Boolean check for if something has the trait Flushable.
Definition at line 399 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type has a zero-parameter deinit.
Definition at line 420 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type has an init with the param types.
Definition at line 413 of file core/mtcore/traits.hpp.
|
constexpr |
Boolean check for if something has the trait Iterator.
Definition at line 392 of file core/mtcore/traits.hpp.
|
constexpr |
Boolean check for if something has the trait Addressable.
Definition at line 378 of file core/mtcore/traits.hpp.
|
constexpr |
Boolean check for if something has the trait Iterator.
Definition at line 385 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type can be received from.
T | Type to check |
Definition at line 323 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be received from (blocking, timeout)
T | Type to check |
Definition at line 339 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be received from (blocking)
T | Type to check |
Definition at line 331 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type is result-like with no success value.
T | Type to check |
V | Expected success value |
Definition at line 364 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type is result-like with a success value type.
T | Type to check |
V | Expected success value |
Definition at line 349 of file core/mtcore/traits.hpp.
|
constexpr |
Checks if a type can be used in a select statement as an option.
T | Type to check |
Definition at line 411 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to.
T | Type to check |
Definition at line 275 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to (blocking, timeout)
T | Type to check |
Definition at line 307 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to (blocking, timeout) with growing.
T | Type to check |
Definition at line 315 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to (blocking)
T | Type to check |
Definition at line 291 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to (blocking) with growing.
T | Type to check |
Definition at line 299 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to with growing.
T | Type to check |
Definition at line 283 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from.
T | Type to check |
Definition at line 347 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from (blocking, timeout)
T | Type to check |
Definition at line 379 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from (blocking, timeout) with growing send.
T | Type to check |
Definition at line 387 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from (blocking)
T | Type to check |
Definition at line 363 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from (blocking) with growing send.
T | Type to check |
Definition at line 371 of file thread/mtcore_thread/traits.hpp.
|
constexpr |
Checks if a type can be sent to and received from with growing send.
T | Type to check |
Definition at line 355 of file thread/mtcore_thread/traits.hpp.