yyzybb537 / libgo

Go-style concurrency in C++11
MIT License
3.2k stars 756 forks source link

有一些编译警告瑕疵希望能修复 #289

Open yangyongzhen opened 1 year ago

yangyongzhen commented 1 year ago

里面文件大都是utf-8编码的,没问题。但是其中有个:libgo\common\config.h文件编码竟是gb18130 一大堆编译警告: warning C4828: 文件包含在偏移 0x725 处开始的字符,该字符在当前源字符集中无效(代码页 936) (注:使用vcpkg.exe安装的存在此问题,源码里config.h头文件编码格式是ok的)

还有这个编译警告: libgo\common\dbg_timer.h(26): note: see reference to function template instantiation 'std::pair<int,int>::pair<int&,_Rep,void,0>(_Other1,_Other2 &&) noexcept' being compiled [build] with [build] [ [build] _Rep=int64, [build] _Other1=int &, [build] _Other2=int64 [build] ] [build] e:\test\cpp\try\include\libgo\common\dbg_timer.h(26): note: see reference to function template instantiation 'std::pair<int,int>::pair<int&,_Rep,void,0>(_Other1,_Other2 &&) noexcept' being compiled [build] with [build] [ [build] _Rep=int64, [build] _Other1=int &, [build] _Other2=int64 [build] ]

虽然只是警告不伤大雅, 但就是看着不舒服,希望能优化掉。 注:(环境使用的是windows 下的vcpkg下载安装的。) find_package(libgo CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE libgo::libgo) 配置了,cmake编译时提示仍然找不到库和头文件?有遇到这个问题的没?无奈拷过来用了。