Skip to content

process.hpp fails to compile with BOOST_PROCESS_V2_STANDALONE defined #535

@jwhitworth-vicon

Description

@jwhitworth-vicon

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.

is_convertible<ExecutionContext&,

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions