MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
traits.hpp File Reference
#include <concepts>
#include <ostream>
Include dependency graph for core/mtcore/traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mtcore
 Core library for C++ with Zig-related functionality.
 
namespace  mtcore::io
 

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::Initable
 
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::Pointer
 
concept  mtcore::WriteThrough
 Checks if a writer type is a write-through writer.
 
concept  mtcore::Flushable
 Represents a type that can be "flushed" (e.g.
 
concept  mtcore::ReaderImpl
 Represents an implementation of a reader (basically checks if the type can be wrapped with Reader<>)
 
concept  mtcore::InlineFormattable
 
concept  mtcore::Formattable
 Represents a type that can be formatted.
 
concept  mtcore::DefaultFormattable
 Types we want to specify default ostream operators based on Formatter We exclude StdIterable types to exclude the standard library (which generally has ostream operators already) We also exclude several primitives that we define formatting for (they generally have ostream operators as well)
 

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_write_through = impl::IsWriteThrough<T>::value
 Checks if a writer type is a write-through writer.
 
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.