Skip to content

Intrinsic Procedure __initializer_list__

IsaacShelton edited this page Nov 13, 2022 · 3 revisions

'__initializer_list__' function

The __initializer_list__ function can be defined to specify how initializer lists are created

func __initializer_list__(array *$T, length usize) $I {
    
}

where

  • $T is the element type of the initializer list
  • $I is the type that will be used for initializer lists, usually something like <$T> MyInitializerList

This is usually not defined by the user, instead 2.7/InitializerList.adept provides the common definition used by most programmers

Arguments

  • array - Pointer to stack allocated array items
  • length - Total number of items
Clone this wiki locally