StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
StormByte::Type::TriviallyCopyable Concept Reference

Concept to check if a type is trivially copyable. More...

#include <type_traits.hxx>

Concept definition

template<typename T>
concept StormByte::Type::TriviallyCopyable = std::is_trivially_copyable_v<T>
Concept to check if a type is trivially copyable.
Definition type_traits.hxx:305

Detailed Description

Concept to check if a type is trivially copyable.

Template Parameters
TType to check.

A type satisfies TriviallyCopyable if it can be safely copied with memcpy.

template<Type::TriviallyCopyable T>
void fast_copy(T* dest, const T* src, size_t n) { std::memcpy(dest, src, n * sizeof(T)); }