Function initialize

Synopsis

#include <src/uvw/handle.hpp>

template <typename F, typename... Args>
bool initialize(F &&f, Args &&... args)

Description

No description yet.

Mentioned in

Source

Lines 45-58 in src/uvw/handle.hpp.

template<typename F, typename... Args>
bool initialize(F &&f, Args&&... args) {
    if(!this->self()) {
        auto err = std::forward<F>(f)(this->parent(), this->get(), std::forward<Args>(args)...);
        if(err) {
            this->publish(ErrorEvent{err});
        } else {
            this->leak();
        }
    }
    return this->self();
}





Add Discussion as Guest

Log in