boostorg / boostorg/process

process.hpp fails to compile with BOOST_PROCESS_V2_STANDALONE defined

Open
#535 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Description

When compiling code including the `boost\process\v2\process.hpp` header with the defines `BOOST_PROCESS_STANDALONE`, `BOOST_PROCESS_V2_STANDALONE` and `BOOST_PROCESS_USE_STD_FS`, there are compiler errors with Visual Studio 2022 17.14:

```
1>e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(167,57): error C2653: 'is_convertible': is not a class or namespace name
1>(compiling source file 'UtilsSystem.pch.cpp')
1> e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(167,57):
1> the template instantiation context (the oldest one first) is
1> e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(38,8):
1> while compiling class template 'process_v2::basic_process'
1>e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(167,59): error C2065: 'value': undeclared identifier
1>(compiling source file 'UtilsSystem.pch.cpp')
1>e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(167,59): error C2975: '_Test': invalid template argument for 'std::enable_if', expected compile-time constant expression
1>(compiling source file 'UtilsSystem.pch.cpp')
1> C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.44.35207\include\xtr1common(47,28):
1> see declaration of '_Test'
1>e:\thirdparty\Boost\boost-1.88.0-windows-vc143-x64\include\boost-1_88\boost\process\v2\process.hpp(167,75): error C2039: 'type': is not a member of 'std::enable_if'
1>(compiling source file 'UtilsSystem.pch.cpp')
1> C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.44.35207\include\xtr1common(48,8):
1> see declaration of 'std::enable_if'
```

This is because one of the `basic_process` constructors uses `is_convertible` without fully qualifying it with the `std::` namespace like the other earlier constructors do.

https://github.com/boostorg/process/blob/2a41d0a0dcef77ff362c1e3a7cc88b47191ff9d2/include/boost/process/v2/process.hpp#L168

I am not sure if it is one of the defines or the combination of those defines. It is also not clear which defines I actually need if I want to use standalone asio and filesystem from the standard library.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.