Skip to content

std Namespace

std

Core standard library functions and types for the Helix language

Classes

Function<ReturnType, Args...>

Represents a function type with specified return type and argument types

Generator<YieldType>

Represents a generator type that yields values of the specified type, C++ coroutines are used in the implementation

null_t

Represents a null value, used for null pointers or null values in containers

TypeErasure

A type erasure mechanism that allows for type removal

Range<T>

Represents a range of values of type T

Questionable<T>

Represents a type that can be nullable or panicable

Functions

as_cast<To, From>

Performs a safe cast from one type to another

as_const<To, From>

Converts a type to a const type

as_unsafe<To, From>

Performs an unsafe cast from one type to another

next

Retrieves the next value from a generator

endl

Represents an endline character for output streaming in print function call

stringf

Formats a string using the specified format and arguments, similar to printf in C

crash<T>

Crashes the program with a specified Panicable object

erase_type<T>

Erases the type of an object and returns a TypeErasure object

range

Creates a range from 0 to last with step 1

range

Creates a range from first to last with specified step

to_string

Converts various types to string representation

char_to_cchar

Converts a wide character to a char (c-char)

sstring_to_string

Converts a sstring to a string (sstring being helix::String::basic<char>)

cstrptr_to_string

Converts a C-style string pointer to a string with specified size

string_to_sstring

Converts a string to a sstring

strptr_to_cstrptr

Converts a wide string pointer to a C-style string pointer