#define FUNCTION_NAME __func__ // 또는 __PRETTY_FUNCTION__
void doSomething() {
std::string methodName = FUNCTION_NAME;
std::cout << "현재 함수명: " << methodName << "\\n";
}
std::string capturedName = "doTask";
std::unordered_map<std::string, std::function<void()>> dispatcher;
dispatcher["doTask"] = []() { std::cout << "doTask 실행됨!\\n"; };
if (dispatcher.count(capturedName)) {
dispatcher[capturedName](); // 런타임에 실행!
}