For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
is_trivially_copyable
def is_trivially_copyable[T: Copyable]() -> Bool
Returns whether T has a trivial copy constructor.
A copy constructor is trivial when the compiler generates it and all of
T's fields are themselves trivially copyable. In practice this means the
value can be copied by duplicating its bits to a new location without any
additional side effects.
Deprecated: 'is_trivially_copyable' is deprecated, use 'IsTriviallyCopyable' instead
Parameters:
- T (
Copyable): The type to check.
Returns:
Bool: True if T has a trivial copy constructor.