W3cubDocs

/D

core.internal.array.utils

This module contains utility functions to help the implementation of the runtime hook

License:
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
Source
core/internal/array/utils.d
pure @trusted auto _d_HookTraceImpl(T, alias Hook, string errorMessage)(string file, int line, string funcname, Parameters!Hook parameters);

TraceGC wrapper around runtime hook Hook.

Parameters:
T Type of hook to report to accumulate
Hook The hook to wrap
errorMessage The error message incase version != D_TypeInfo
string file File that called _d_HookTraceImpl
int line Line inside of file that called _d_HookTraceImpl
string funcname Function that called _d_HookTraceImpl
Parameters!Hook parameters Parameters that will be used to call Hook
Bugs:
This function template needs be between the compiler and a much older runtime hook that bypassed safety, purity, and throwabilty checks. To prevent breaking existing code, this function template is temporarily declared @trusted pure until the implementation can be brought up to modern D expectations.
enum auto isNoThrow(alias F);

Check if the function F is calleable in a nothrow scope.

Parameters:
F Function that does not take any parameters
Returns:
if the function is callable in a nothrow scope.
template isPostblitNoThrow(T)

Check if the type T's postblit is called in nothrow, if it exist

Parameters:
T Type to check
Returns:
if the postblit is callable in a nothrow scope, if it exist. if it does not exist, return true.

© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/core_internal_array_utils.html