process.hpp fails to compile with BOOST_PROCESS_V2_STANDALONE defined

Open
#535 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start in include/boost/process/v2/process.hpp around line 168 and reproduce the header compilation with BOOST_PROCESS_STANDALONE, BOOST_PROCESS_V2_STANDALONE, and BOOST_PROCESS_USE_STD_FS under Visual Studio 2022. Check the constructor's namespace usage and determine which definitions are required for standalone Asio and standard filesystem; done means the reported configuration compiles.

Written by the indexing model from the issue text.

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<false,void *>'
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<false,void *>'

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.

Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/process

All issues in boostorg/process

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.