std::string_view 的使用
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <csignal>
|
||||
#include <future>
|
||||
#include "Local_Server/server/io_coro.h"
|
||||
#include <string_view>
|
||||
// ./server ./config.json
|
||||
#ifdef __linux__
|
||||
#include <malloc.h>
|
||||
@@ -87,7 +88,7 @@ int psc_main(int argc, char* argv[]) {
|
||||
std::cout << " 正常退出" << std::endl;
|
||||
};
|
||||
auto g = Global::instance();
|
||||
Psc::set_fail_fast([](const std::string& name) {
|
||||
Psc::set_fail_fast([](std::string_view name) {
|
||||
// 如果是在 Global::instance() 里面失败是不能调用这个处理函数的
|
||||
auto g = Global::instance();
|
||||
std::cout << "set_fail_fast 退出原因: 222" << name << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user