Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::HasInitMemberFunction Concept Reference

Evaluates to true if the type T is a component that has a init() member function, that must be called to initialize the component. More...

Concept definition

template<typename T>
concept vcl::comp::HasInitMemberFunction = ComponentConcept<T> && requires (T&& obj) {
{ obj.init() } -> std::same_as<void>;
}
The ComponentConcept is evaluated to true whenever the type T is a valid component,...
Definition component.h:44
Evaluates to true if the type T is a component that has a init() member function, that must be called...
Definition component.h:91

Detailed Description

Evaluates to true if the type T is a component that has a init() member function, that must be called to initialize the component.

The init() function is necessary in components that may be optional and, when enabled, they need to be initialized.

Note
Only components that store data that require non-default initialization should have the init() function.
Template Parameters
TThe type to be evaluated.