ubuntu 19.04上的boost::process::env坏了吗? 以下C++程序: #include <boost/process/env.hpp> int main() {} #包括 int main(){}

ubuntu 19.04上的boost::process::env坏了吗? 以下C++程序: #include <boost/process/env.hpp> int main() {} #包括 int main(){},c++,ubuntu,boost,C++,Ubuntu,Boost,不会编译: $ g++ test.cc In file included from test.cc:1: /usr/include/boost/process/env.hpp:107:19: error: ‘is_wchar_t’ is not a class template template<> struct is_wchar_t<env_set<wchar_t>> : std::true_type {};

不会编译:

$ g++ test.cc

In file included from test.cc:1:
/usr/include/boost/process/env.hpp:107:19: error: ‘is_wchar_t’ is not a class template
 template<> struct is_wchar_t<env_set<wchar_t>>           : std::true_type {};
                   ^~~~~~~~~~
$g++test.cc
在test.cc:1中包含的文件中:
/usr/include/boost/process/env.hpp:107:19:错误:“is_wchar__t”不是类模板
模板结构是_wchar_t:std::true_type{};
^~~~~~~~~~
我使用的是Ubuntu19.04和gcc 8.3.0以及libboost1.67-dev


有什么想法吗?

解决方法是包括定义is\u wchar\t模板的文件:

#include <boost/process/detail/traits/wchar_t.hpp>
#包括

在RHEL上也出现故障