로딩중...
검색중...
일치하는것 없음
by::end 클래스 참조

Deferred execution utility similar to defer keyword in other languages 더 자세히 ...

#include <end.hpp>

by::end에 대한 상속 다이어그램 :
by::scopeLog

Public 멤버 함수

 end (std::function< void(void)> l)
 

상세한 설명

Deferred execution utility similar to defer keyword in other languages

Delays code execution until the end of the current scope. Similar to the defer keyword found in languages like Go or Swift.

In byeolang, end registers code to be executed when exiting the current function. In C++, this is implemented using RAII and is limited to scope boundaries rather than function boundaries.

Usage

Use the provided macros for convenient deferred execution:

void processFile() {
FILE* f = fopen("data.txt", "r");
BY_END(fclose(f)); // Automatically closes file when leaving scope
// Or use block form for multiple statements:
BY_END_BLOCK({
});
// ... do work with file ...
} // fclose(f) executes here automatically
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: