IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.1.0
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_movable

def is_trivially_movable[T: Movable]() -> Bool

Returns whether T has a trivial move constructor.

A move constructor is trivial when the compiler generates it and all of T's fields are themselves trivially movable. In practice this means the value can be moved by copying its bits to a new location without any additional side effects.

Deprecated: 'is_trivially_movable' is deprecated, use 'IsTriviallyMovable' instead

Parameters:

  • ​T (Movable): The type to check.

Returns:

Bool: True if T has a trivial move constructor.