1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-14 18:17:59 -05:00

Initial commit

This commit is contained in:
Crimson-Hawk
2024-03-05 16:42:40 +08:00
commit f1e4595ebf
39576 changed files with 7006612 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_C_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_DEBUG "-c65001 -DWIN32 -D_DEBUG")

View File

@@ -0,0 +1,50 @@
[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/debug" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/cmake-get-vars-x64-windows-dbg.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/cmake-get-vars-x64-windows-rel.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_C_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_RELEASE "-c65001 -DWIN32 ")

View File

@@ -0,0 +1,2 @@
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-rel.cmake.log")
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-dbg.cmake.log")

View File

@@ -0,0 +1,26 @@
[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/debug" "-DPORT=boost-system" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/src/ost-1.79.0-fa1427021e.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows" "-DPORT=boost-system" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/src/ost-1.79.0-fa1427021e.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel

View File

View File

View File

@@ -0,0 +1,234 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@370 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>debug
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/stage/lib <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Building target '../build/boost_system'
Build request: object(property-set)@377 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>off <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1 <link>static:<define>BOOST_SYSTEM_STATIC_LINK=1 <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Usage requirements for boost_system:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
*** construct LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
Usage requirements from boost_system: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Usage requirements for stage: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/debug/address-model-64/architecture-x86/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_system-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam18acaff8.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam18acaff8.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\error_code.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\error_code.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\error_code.obj" -TP /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /Z7 /Od /Ob0 /W3 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
error_code.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\error_code.obj" /DEBUG -machine:x64 -nologo -debug -INCREMENTAL /MACHINE:X64 /MANIFEST:EMBED /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\stage\lib\boost_system-vc142-mt-gd-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_system-vc142-mt-gd-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-dbg && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Debug"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/debug/lib/boost_system-vc142-mt-gd-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/debug/bin/boost_system-vc142-mt-gd-x64-1_79.dll

View File

@@ -0,0 +1,234 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=release --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@370 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>release
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/stage/lib <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Building target '../build/boost_system'
Build request: object(property-set)@377 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>full <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1 <link>static:<define>BOOST_SYSTEM_STATIC_LINK=1 <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Usage requirements for boost_system:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
*** construct LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { error_code.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
Usage requirements from boost_system: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Usage requirements for stage: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-system\src\ost-1.79.0-fa1427021e.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_SYSTEM_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/release/address-model-64/architecture-x86/debug-symbols-on/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_system-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-error_code.obj.OBJ { error_code.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_SYSTEM_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-system/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam1accaff9.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam1accaff9.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\error_code.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\error_code.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\error_code.obj" -TP /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 /O2 /Z7 /Ob2 /W3 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DNDEBUG "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
error_code.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\error_code.obj" /DEBUG -machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF /MACHINE:X64 /MANIFEST:EMBED /OPT:REF,ICF /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\stage\lib\boost_system-vc142-mt-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_system-vc142-mt-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-system\x64-windows-rel && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Release"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/lib/boost_system-vc142-mt-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-system_x64-windows/bin/boost_system-vc142-mt-x64-1_79.dll

View File

@@ -0,0 +1,253 @@
# Copyright 2022 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
local library = "system";
local triggers =
{
branch: [ "master", "develop", "feature/*" ]
};
local ubsan = { UBSAN: '1', UBSAN_OPTIONS: 'print_stacktrace=1' };
local asan = { ASAN: '1' };
local linux_pipeline(name, image, environment, packages = "", sources = [], arch = "amd64") =
{
name: name,
kind: "pipeline",
type: "docker",
trigger: triggers,
platform:
{
os: "linux",
arch: arch
},
steps:
[
{
name: "everything",
image: image,
environment: environment,
commands:
[
'set -e',
'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -',
] +
(if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) +
(if packages != "" then [ 'apt-get update', 'apt-get -y install ' + packages ] else []) +
[
'export LIBRARY=' + library,
'./.drone/drone.sh',
]
}
]
};
local macos_pipeline(name, environment, xcode_version = "12.2", osx_version = "catalina", arch = "amd64") =
{
name: name,
kind: "pipeline",
type: "exec",
trigger: triggers,
platform: {
"os": "darwin",
"arch": arch
},
node: {
"os": osx_version
},
steps: [
{
name: "everything",
environment: environment + { "DEVELOPER_DIR": "/Applications/Xcode-" + xcode_version + ".app/Contents/Developer" },
commands:
[
'export LIBRARY=' + library,
'./.drone/drone.sh',
]
}
]
};
local windows_pipeline(name, image, environment, arch = "amd64") =
{
name: name,
kind: "pipeline",
type: "docker",
trigger: triggers,
platform:
{
os: "windows",
arch: arch
},
"steps":
[
{
name: "everything",
image: image,
environment: environment,
commands:
[
'cmd /C .drone\\\\drone.bat ' + library,
]
}
]
};
[
linux_pipeline(
"Linux 14.04 GCC 4.4",
"cppalliance/droneubuntu1404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-4.4', CXXSTD: '98,0x' },
"g++-4.4",
[ "ppa:ubuntu-toolchain-r/test" ],
),
linux_pipeline(
"Linux 14.04 GCC 4.6",
"cppalliance/droneubuntu1404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-4.6', CXXSTD: '98,0x' },
"g++-4.6",
[ "ppa:ubuntu-toolchain-r/test" ],
),
linux_pipeline(
"Linux 14.04 GCC 4.7",
"cppalliance/droneubuntu1404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-4.7', CXXSTD: '98,0x' },
"g++-4.7",
[ "ppa:ubuntu-toolchain-r/test" ],
),
linux_pipeline(
"Linux 14.04 GCC 4.8*",
"cppalliance/droneubuntu1404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11' },
),
linux_pipeline(
"Linux 14.04 GCC 4.9",
"cppalliance/droneubuntu1404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-4.9', CXXSTD: '03,11' },
"g++-4.9",
[ "ppa:ubuntu-toolchain-r/test" ],
),
linux_pipeline(
"Linux 16.04 GCC 5*",
"cppalliance/droneubuntu1604:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14' },
),
linux_pipeline(
"Linux 18.04 GCC 6",
"cppalliance/droneubuntu1804:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-6', CXXSTD: '03,11,14' },
"g++-6",
),
linux_pipeline(
"Linux 18.04 GCC 7* 32/64",
"cppalliance/droneubuntu1804:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17', ADDRMD: '32,64' },
),
linux_pipeline(
"Linux 18.04 GCC 8",
"cppalliance/droneubuntu1804:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-8', CXXSTD: '03,11,14,17' },
"g++-8",
),
linux_pipeline(
"Linux 20.04 GCC 9* 32",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a', ADDRMD: '32' },
),
linux_pipeline(
"Linux 20.04 GCC 9* 64",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a', ADDRMD: '64' },
),
linux_pipeline(
"Linux 20.04 GCC 9 ARM64 32/64",
"cppalliance/droneubuntu2004:multiarch",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '03,11,14,17,2a', ADDRMD: '32,64' },
arch="arm64",
),
linux_pipeline(
"Linux 20.04 GCC 10 32 ASAN",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '03,11,14,17,20', ADDRMD: '32' } + asan,
"g++-10-multilib",
),
linux_pipeline(
"Linux 20.04 GCC 10 64 ASAN",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '03,11,14,17,20', ADDRMD: '64' } + asan,
"g++-10-multilib",
),
linux_pipeline(
"Linux 20.04 Clang 13",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-13', CXXSTD: '03,11,14,17,20' },
"clang-13",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"],
),
linux_pipeline(
"Linux 20.04 Clang 14 UBSAN",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20' } + ubsan,
"clang-14",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"],
),
linux_pipeline(
"Linux 20.04 Clang 14 ASAN",
"cppalliance/droneubuntu2004:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20' } + asan,
"clang-14",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"],
),
macos_pipeline(
"MacOS 10.15 Xcode 12.2 UBSAN",
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + ubsan,
),
macos_pipeline(
"MacOS 10.15 Xcode 12.2 ASAN",
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + asan,
),
windows_pipeline(
"Windows VS2015 msvc-14.0",
"cppalliance/dronevs2015",
{ TOOLSET: 'msvc-14.0', CXXSTD: '14,latest' },
),
windows_pipeline(
"Windows VS2017 msvc-14.1",
"cppalliance/dronevs2017",
{ TOOLSET: 'msvc-14.1', CXXSTD: '14,17,latest' },
),
windows_pipeline(
"Windows VS2019 msvc-14.2",
"cppalliance/dronevs2019",
{ TOOLSET: 'msvc-14.2', CXXSTD: '14,17,20,latest' },
),
windows_pipeline(
"Windows VS2022 msvc-14.3",
"cppalliance/dronevs2022:1",
{ TOOLSET: 'msvc-14.3', CXXSTD: '14,17,20,latest' },
),
]

View File

@@ -0,0 +1,23 @@
@REM Copyright 2022 Peter Dimov
@REM Distributed under the Boost Software License, Version 1.0.
@REM https://www.boost.org/LICENSE_1_0.txt
@ECHO ON
set LIBRARY=%1
set DRONE_BUILD_DIR=%CD%
set BOOST_BRANCH=develop
if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/boostdep
xcopy /s /e /q %DRONE_BUILD_DIR% libs\%LIBRARY%\
python tools/boostdep/depinst/depinst.py %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
b2 -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Copyright 2022 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
set -ex
DRONE_BUILD_DIR=$(pwd)
BOOST_BRANCH=develop
if [ "$DRONE_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/boostdep
cp -r $DRONE_BUILD_DIR/* libs/$LIBRARY
python tools/boostdep/depinst/depinst.py $LIBRARY
./bootstrap.sh
./b2 -d0 headers
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
./b2 -j3 libs/$LIBRARY/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}

View File

@@ -0,0 +1,96 @@
* text=auto !eol svneol=native#text/plain
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=native#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl
*.pm text svneol=native#text/x-perl
*.py text svneol=native#text/x-python
*.sh eol=lf svneol=LF#text/x-sh
configure eol=lf svneol=LF#text/x-sh
# Image formats
*.bmp binary svneol=unset#image/bmp
*.gif binary svneol=unset#image/gif
*.ico binary svneol=unset#image/ico
*.jpeg binary svneol=unset#image/jpeg
*.jpg binary svneol=unset#image/jpeg
*.png binary svneol=unset#image/png
*.tif binary svneol=unset#image/tiff
*.tiff binary svneol=unset#image/tiff
*.svg text svneol=native#image/svg%2Bxml
# Data formats
*.pdf binary svneol=unset#application/pdf
*.avi binary svneol=unset#video/avi
*.doc binary svneol=unset#application/msword
*.dsp text svneol=crlf#text/plain
*.dsw text svneol=crlf#text/plain
*.eps binary svneol=unset#application/postscript
*.gz binary svneol=unset#application/gzip
*.mov binary svneol=unset#video/quicktime
*.mp3 binary svneol=unset#audio/mpeg
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
*.ps binary svneol=unset#application/postscript
*.psd binary svneol=unset#application/photoshop
*.rdf binary svneol=unset#text/rdf
*.rss text svneol=unset#text/xml
*.rtf binary svneol=unset#text/rtf
*.sln text svneol=native#text/plain
*.swf binary svneol=unset#application/x-shockwave-flash
*.tgz binary svneol=unset#application/gzip
*.vcproj text svneol=native#text/xml
*.vcxproj text svneol=native#text/xml
*.vsprops text svneol=native#text/xml
*.wav binary svneol=unset#audio/wav
*.xls binary svneol=unset#application/vnd.ms-excel
*.zip binary svneol=unset#application/zip
# Text formats
.htaccess text svneol=native#text/plain
*.bbk text svneol=native#text/xml
*.cmake text svneol=native#text/plain
*.css text svneol=native#text/css
*.dtd text svneol=native#text/xml
*.htm text svneol=native#text/html
*.html text svneol=native#text/html
*.ini text svneol=native#text/plain
*.log text svneol=native#text/plain
*.mak text svneol=native#text/plain
*.qbk text svneol=native#text/plain
*.rst text svneol=native#text/plain
*.sql text svneol=native#text/x-sql
*.txt text svneol=native#text/plain
*.xhtml text svneol=native#text/xhtml%2Bxml
*.xml text svneol=native#text/xml
*.xsd text svneol=native#text/xml
*.xsl text svneol=native#text/xml
*.xslt text svneol=native#text/xml
*.xul text svneol=native#text/xul
*.yml text svneol=native#text/plain
boost-no-inspect text svneol=native#text/plain
CHANGES text svneol=native#text/plain
COPYING text svneol=native#text/plain
INSTALL text svneol=native#text/plain
Jamfile text svneol=native#text/plain
Jamroot text svneol=native#text/plain
Jamfile.v2 text svneol=native#text/plain
Jamrules text svneol=native#text/plain
Makefile* text svneol=native#text/plain
README text svneol=native#text/plain
TODO text svneol=native#text/plain
# Code formats
*.c text svneol=native#text/plain
*.cpp text svneol=native#text/plain
*.h text svneol=native#text/plain
*.hpp text svneol=native#text/plain
*.ipp text svneol=native#text/plain
*.tpp text svneol=native#text/plain
*.jam text svneol=native#text/plain
*.java text svneol=native#text/plain

View File

@@ -0,0 +1,359 @@
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- toolset: gcc-4.8
cxxstd: "03,11"
os: ubuntu-18.04
install: g++-4.8
- toolset: gcc-5
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: g++-5
- toolset: gcc-6
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: g++-6
- toolset: gcc-7
cxxstd: "03,11,14,17"
os: ubuntu-18.04
- toolset: gcc-8
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
install: g++-8
- toolset: gcc-9
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: gcc-10
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: g++-10
- toolset: gcc-11
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: g++-11
- toolset: clang
compiler: clang++-3.9
cxxstd: "03,11,14"
os: ubuntu-18.04
install: clang-3.9
- toolset: clang
compiler: clang++-4.0
cxxstd: "03,11,14"
os: ubuntu-18.04
install: clang-4.0
- toolset: clang
compiler: clang++-5.0
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: clang-5.0
- toolset: clang
compiler: clang++-6.0
cxxstd: "03,11,14,17"
os: ubuntu-18.04
install: clang-6.0
- toolset: clang
compiler: clang++-7
cxxstd: "03,11,14,17"
os: ubuntu-18.04
install: clang-7
- toolset: clang
compiler: clang++-8
cxxstd: "03,11,14,17"
os: ubuntu-20.04
install: clang-8
- toolset: clang
compiler: clang++-9
cxxstd: "03,11,14,17"
os: ubuntu-20.04
install: clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
compiler: clang++-11
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
compiler: clang++-12
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 -d0 headers
- name: Create user-config.jam
if: matrix.compiler
run: |
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
- name: Run tests
run: |
cd ../boost-root
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.0
cxxstd: "14"
addrmd: 32,64
os: windows-2019
- toolset: msvc-14.1
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2016
- toolset: msvc-14.2
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2019
- toolset: msvc-14.3
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2022
- toolset: gcc
cxxstd: "03,11,14,17,2a"
addrmd: 64
os: windows-2019
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
cd ../boost-root
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
posix-cmake-subdir:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
- name: Use library with add_subdirectory
run: |
cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test
mkdir __build__ && cd __build__
cmake ..
cmake --build .
ctest --output-on-failure --no-tests=error
posix-cmake-install:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
- name: Configure
run: |
cd ../boost-root
mkdir __build__ && cd __build__
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ..
- name: Install
run: |
cd ../boost-root/__build__
cmake --build . --target install
- name: Use the installed library
run: |
cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
cmake --build .
ctest --output-on-failure --no-tests=error
posix-cmake-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
- name: Configure
run: |
cd ../boost-root
mkdir __build__ && cd __build__
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ..
- name: Build tests
run: |
cd ../boost-root/__build__
cmake --build . --target tests
- name: Run tests
run: |
cd ../boost-root/__build__
ctest --output-on-failure --no-tests=error

View File

@@ -0,0 +1,218 @@
# Copyright 2016-2019 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
dist: xenial
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11,14 ADDRMD=32,64
addons:
apt:
packages:
- g++-multilib
- os: linux
arch: arm64
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11,14 ADDRMD=32,64
- os: linux
arch: ppc64le
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11,14
- os: linux
arch: s390x
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11,14 ADDRMD=32,64
- os: linux
compiler: g++-4.4
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
addons:
apt:
packages:
- g++-4.4
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.6
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
addons:
apt:
packages:
- g++-4.6
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
- os: linux
dist: bionic
compiler: g++-11
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-11 CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
addons:
apt:
packages:
- g++-11
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: trusty
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.3
- os: linux
dist: trusty
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.4
- os: linux
compiler: clang++-12
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-12 CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- clang-12
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
dist: bionic
compiler: clang++-libc++
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- libc++-dev
- os: freebsd
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,17,2a
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z ADDRMD=32,64
osx_image: xcode7.3
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z ADDRMD=32,64
osx_image: xcode8.3
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z ADDRMD=32,64
osx_image: xcode9.4
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode10.1
- os: osx
osx_image: xcode11.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
- os: osx
osx_image: xcode12.2
compiler: clang++
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
- os: linux
env: CMAKE=1
script:
- mkdir __build__ && cd __build__
- cmake -DBOOST_INCLUDE_LIBRARIES=system -DBUILD_TESTING=ON ..
- cmake --build . --target tests
- ctest --output-on-failure --no-tests=error
- os: linux
env: CMAKE=1 BUILD_SHARED_LIBS=ON
script:
- mkdir __build__ && cd __build__
- cmake -DBUILD_SHARED_LIBS=ON -DBOOST_INCLUDE_LIBRARIES=system -DBUILD_TESTING=ON ..
- cmake --build . --target tests
- ctest --output-on-failure --no-tests=error
- os: linux
env: CMAKE_SUBDIR_TEST=1
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- git clone -b $BOOST_BRANCH https://github.com/boostorg/assert.git ../assert
- git clone -b $BOOST_BRANCH https://github.com/boostorg/config.git ../config
- git clone -b $BOOST_BRANCH https://github.com/boostorg/core.git ../core
- git clone -b $BOOST_BRANCH https://github.com/boostorg/predef.git ../predef
- git clone -b $BOOST_BRANCH https://github.com/boostorg/winapi.git ../winapi
script:
- cd test/cmake_subdir_test && mkdir __build__ && cd __build__
- cmake ..
- cmake --build .
- cmake --build . --target check
- os: linux
env: CMAKE_INSTALL=1
script:
- pip install --user cmake
- mkdir __build__ && cd __build__
- cmake -DBOOST_INCLUDE_LIBRARIES=system -DCMAKE_INSTALL_PREFIX=~/.local ..
- cmake --build . --target install
- cd ../libs/system/test/cmake_install_test && mkdir __build__ && cd __build__
- cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
- cmake --build .
- cmake --build . --target check
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/boostdep
- cp -r $TRAVIS_BUILD_DIR/* libs/system
- python tools/boostdep/depinst/depinst.py system
- ./bootstrap.sh
- ./b2 headers
script:
- |-
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
- ./b2 -j3 libs/system/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
notifications:
email:
on_success: always

View File

@@ -0,0 +1,27 @@
# Copyright 2018-2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_system VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_system INTERFACE)
add_library(Boost::system ALIAS boost_system)
target_include_directories(boost_system INTERFACE include)
target_link_libraries(boost_system
INTERFACE
Boost::assert
Boost::config
Boost::throw_exception
Boost::variant2
Boost::winapi
)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@@ -0,0 +1,180 @@
constant BOOST_VERSION : 1.79.0 ;
constant BOOST_VERSION_ABI_TAG : 1_79 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
import boostcpp ;
import feature ;
boostcpp.set-version $(BOOST_VERSION) ;
project boost : requirements
<include>include&&"D:/a/1/s/build/vcpkg_installed/x64-windows/include"
<define>BOOST_ALL_NO_LIB=1
<tag>@$(__name__).tag
;
rule boost-install ( libraries * )
{
stagedir = [ option.get stagedir ] ;
install stage
: $(libraries)
: <location>$(stagedir)/lib ;
}
rule tag ( name : type ? : property-set )
{
return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
}
rule python-tag ( name : type ? : property-set )
{
return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
}
if "boost-system" != "boost-system"
{
use-project /boost/system : . ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_system-vc140-mt.lib" <variant>release ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_system-vc140-mt-gd.lib" <variant>debug ;
explicit boost_system ;
use-project /boost : . ;
alias system : boost_system ;
}
if "boost-system" != "boost-chrono"
{
use-project /boost/chrono : . ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_chrono-vc140-mt.lib" <variant>release ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_chrono-vc140-mt-gd.lib" <variant>debug ;
explicit boost_chrono ;
}
if "boost-system" != "boost-regex"
{
use-project /boost/regex : . ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_regex-vc140-mt.lib" <variant>release ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_regex-vc140-mt-gd.lib" <variant>debug ;
explicit boost_regex ;
}
if "boost-system" != "boost-date-time"
{
use-project /boost/date_time : . ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_date_time-vc140-mt.lib" <variant>release -<library>/boost/date_time//boost_date_time ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_date_time-vc140-mt-gd.lib" <variant>debug -<library>/boost/date_time//boost_date_time ;
explicit boost_date_time ;
}
if "boost-system" != "boost-thread"
{
use-project /boost/thread : . ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_thread-vc140-mt.lib" <variant>release : : <library>/boost/date_time//boost_date_time ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_thread-vc140-mt-gd.lib" <variant>debug : : <library>/boost/date_time//boost_date_time ;
explicit boost_thread ;
}
if "boost-system" != "boost-timer"
{
use-project /boost/timer : . ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_timer-vc140-mt.lib" <variant>release ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_timer-vc140-mt-gd.lib" <variant>debug ;
explicit boost_timer ;
}
if "boost-system" != "boost-filesystem"
{
use-project /boost/filesystem : . ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_filesystem-vc140-mt.lib" <variant>release : : <library>/boost/system//boost_system ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_filesystem-vc140-mt-gd.lib" <variant>debug : : <library>/boost/system//boost_system ;
explicit boost_filesystem ;
}
if "boost-system" != "boost-atomic"
{
use-project /boost/atomic : . ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_atomic-vc140-mt.lib" <variant>release ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_atomic-vc140-mt-gd.lib" <variant>debug ;
explicit boost_atomic ;
}
if "boost-system" != "boost-context"
{
feature.feature segmented-stacks : on : optional propagated composite ;
feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
use-project /boost/context : . ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_context-vc140-mt.lib" <variant>release ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_context-vc140-mt-gd.lib" <variant>debug ;
explicit boost_context ;
}
if "boost-system" != "boost-test"
{
use-project /boost/test : . ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_unit_test_framework-vc140-mt.lib" <variant>release ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" <variant>debug ;
explicit boost_unit_test_framework ;
}
if "boost-system" != "boost-serialization"
{
use-project /boost/serialization : . ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_serialization-vc140-mt.lib" <variant>release ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_serialization-vc140-mt-gd.lib" <variant>debug ;
explicit boost_serialization ;
}
if "boost-system" != "boost-mpi"
{
use-project /boost/mpi : . ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_mpi-vc140-mt.lib" <variant>release : : <library>/boost/serialization//boost_serialization ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_mpi-vc140-mt-gd.lib" <variant>debug : : <library>/boost/serialization//boost_serialization ;
explicit boost_mpi ;
}
if "boost-system" != "boost-container"
{
use-project /boost/container : . ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_container-vc140-mt.lib" <variant>release ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_container-vc140-mt-gd.lib" <variant>debug ;
explicit boost_container ;
}
if "boost-system" != "boost-python"
{
use-project /boost/python : . ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_python-vc140-mt.lib" <variant>release ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_python-vc140-mt-gd.lib" <variant>debug ;
explicit boost_python ;
}
rule requires ( foo * )
{
}
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
{
name = boost_$(name) ;
lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
boost-install $(name) ;
}
use-project /boost/boost-system : build ;
build-project build ;

View File

@@ -0,0 +1,66 @@
# Copyright 2016-2019 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
- /feature\/.*/
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
ADDRMD: 32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0,msvc-14.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
CXXSTD: 14,17,latest
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: clang-win
CXXSTD: 14,17,latest
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\cygwin\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\cygwin64\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
install:
- set BOOST_BRANCH=develop
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
- cd ..
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/boostdep
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\system\
- python tools/boostdep/depinst/depinst.py system
- cmd /c bootstrap
- b2 -d0 headers
build: off
test_script:
- PATH=%ADDPATH%%PATH%
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
- b2 -j3 libs/system/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker

View File

@@ -0,0 +1,25 @@
# Boost System Library Build Jamfile
# (C) Copyright Beman Dawes 2002, 2006
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
# See library home page at https://www.boost.org/libs/system
project boost/system
: source-location ../src
: usage-requirements # pass these requirement to dependents (i.e. users)
<link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
;
SOURCES = error_code ;
lib boost_system
: $(SOURCES).cpp
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
;
boost-install boost_system ;

View File

@@ -0,0 +1,2 @@
/html/
/pdf/

View File

@@ -0,0 +1,23 @@
# Copyright 2017, 2018 Peter Dimov
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import asciidoctor ;
html system.html : system.adoc ;
install html_ : system.html : <location>html ;
pdf system.pdf : system.adoc ;
explicit system.pdf ;
install pdf_ : system.pdf : <location>pdf ;
explicit pdf_ ;
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : html_ ;
explicit boostrelease ;

View File

@@ -0,0 +1,6 @@
<style>
*:not(pre)>code { background: none; color: #600000; }
:not(pre):not([class^=L])>code { background: none; color: #600000; }
</style>

View File

@@ -0,0 +1,30 @@
////
Copyright 2018 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
https://www.boost.org/LICENSE_1_0.txt
////
# Boost.System: Extensible Error Reporting
Beman Dawes, Christopher Kohlhoff, Peter Dimov
:toc: left
:toclevels: 4
:idprefix:
:docinfo: private-footer
:source-highlighter: rouge
:source-language: c++
:leveloffset: +1
include::system/introduction.adoc[]
include::system/usage.adoc[]
include::system/changes.adoc[]
include::system/rationale.adoc[]
include::system/reference.adoc[]
include::system/history.adoc[]
include::system/acknowledgements.adoc[]
include::system/copyright.adoc[]
:leveloffset: -1

View File

@@ -0,0 +1,19 @@
////
Copyright 2003-2017 Beman Dawes
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt
////
[#acknowledgments]
# Acknowledgments
:idprefix: ack_
Christopher Kohlhoff and Peter Dimov made important contributions to the
design. Comments and suggestions were also received from Pavel Vozenilek,
Gennaro Prota, Dave Abrahams, Jeff Garland, Iain Hanson, Oliver Kowalke, and
Oleg Abrosimov. Christopher Kohlhoff suggested several improvements to the
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2066.html[N2066]
paper. Johan Nilsson's comments led to several of the refinements in N2066.

View File

@@ -0,0 +1,123 @@
////
Copyright 2018-2022 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
https://www.boost.org/LICENSE_1_0.txt
////
[#changes]
# Revision History
:idprefix:
## Changes in Boost 1.79
* Added a `boost::source_location` parameter to `throw_exception_from_error`.
* Added `throw_exception_from_error` overloads for `errc::errc_t`,
`std::error_code`, `std::errc`, `std::exception_ptr`.
* `result<T>::value` now automatically supplies `BOOST_CURRENT_LOCATION` to
`throw_exception_from_error` via a default argument.
* Added an `errc::make_error_code` overload taking a source location.
## Changes in Boost 1.78
* Added support for source locations to `error_code`.
* Added `error_code::to_string`, `error_condition::to_string`, `error_code::what`.
* `system_error::what()` now contains the source location, if present.
* Added `result<T, E = error_code>`, a class holding either a value or an
error, defined in `<boost/system/result.hpp>`.
## Changes in Boost 1.77
* The conversion operator from `error_category` to `std::error_category`
has been improved and no longer requires `<map>` or `<mutex>`.
* The comparison operators of `error_category` are now inline friends
instead of member functions (a side effect of the previous change.)
* `error_condition` now defers calling `generic_category()` to avoid
instantiating the object until it's actually needed.
* `error_condition::failed` and `error_condition::message` have been
undeprecated, and `operator bool()` now once again returns `failed()`.
* The system category now doesn't call `generic_category()`, to avoid
instantiating the object.
* The return value of `default_error_condition` changes in some cases into
an `error_condition` from the generic category, instead of from the system
category. This happens on POSIX when the input `error_code` is from
the system category and does not correspond to any `errc_t` value.
* The interoperability of `error_code` and `std::error_code` has been
improved substantially. It is now possible to construct
`boost::system::error_code` from `std::error_code`, and it's possible
to pass `boost::system::error_code` to functions taking `std::error_code&`.
* A stream insertion operator for `error_condition` has been added.
## Changes in Boost 1.76
* `windows_error.hpp` is no longer deprecated.
## Changes in Boost 1.75
* The platform-specific headers `windows_error.hpp`, `linux_error.hpp`,
and `cygwin_error.hpp` emit deprecation messages and are slated for
removal.
* The old names for `generic_category()` and `system_category()` emit
deprecation messages and are slated for removal.
* `error_condition::failed` is deprecated and is slated for removal.
`operator bool()` for `error_condition` has been reverted to its old
meaning of `value() != 0`. This is done for compatibility with
`std::error_condition` as the next release is expected to improve
interoperability with `<system_error>` even further. _Note that this
does not affect_ `error_code::failed`, which is still alive and well.
* The overload of `error_condition::message` that takes a buffer is
deprecated and is slated for removal, for the same reasons. _Note that
this does not affect_ `error_code::message`.
## Changes in Boost 1.74
* `operator bool()` now returns `failed()` instead of `value() != 0`.
## Changes in Boost 1.69
* Boost.System is now header-only. A stub library is still built for
compatibility, but linking to it is no longer necessary.
* Even more functions have been marked `constexpr`.
* The destructor of `error_category` is now protected and no longer
virtual. This is a _potentially breaking change_ but its impact
is expected to be limited.
* `error_category` now has a constructor that accepts a 64 bit identifier,
enabling distinct category objects to compare equal.
* The constructors of `error_category` are now protected.
* A non-allocating, nonthrowing overload of `message` has been added.
* A virtual function `failed` has been added, allowing categories for
which success is not synonymous with 0.
* The deprecated `boost::system::throws` object has been removed.
* `boost::throws()` is now deprecated and its use is discouraged.
* The constructor of `system_error` taking a single `error_code` argument
is now explicit.
* `system_error::code()` now returns by value.
## Changes in Boost 1.68
On a {cpp}14 compiler, many Boost.System functions and member functions
are now `constexpr`, and `error_code` and `error_condition` are literal
classes.
In addition to enabling use in constant expressions (and `constexpr`
functions), this significantly improves the quality of the generated code.
As a result of this change, however, now using Boost.System from {cpp}14
or {cpp}17 code requires that the library be also built with {cpp}14 or
above. This is the default on GCC 6 and newer, but not on GCC 5 or Clang.
One can build Boost for {cpp}14 by passing the `cxxstd=14` option to `b2`.
(Previous versions allowed code built against any {cpp} standard to link
with Boost.System built against any {cpp} standard. In 1.68, code using
any {cpp} standard can link with Boost.System built with {cpp}14 or above,
but if Boost.System is built with {cpp}11 or below, only code also built
with {cpp}11 and below can link to it successfully.)
## Changes in Boost 1.65
On a {cpp}11 compiler, Boost.System now provides implicit conversions
from `boost::system::error_category`, `error_code`, and `error_condition`
to their standard equivalents from `<system_error>`.
This allows libraries to expose a {cpp}11 interface and report errors
via `std::error_code` even when using Boost.System, directly or through a
dependency such as Boost.ASIO.

View File

@@ -0,0 +1,19 @@
////
Copyright 2018-2021 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt
////
[#copyright]
# Copyright and License
:idprefix:
This documentation is
* Copyright 2003-2017 Beman Dawes
* Copyright 2018-2022 Peter Dimov
and is distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].

View File

@@ -0,0 +1,30 @@
////
Copyright 2003-2017 Beman Dawes
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt
////
[#history]
# History
:idprefix: history_
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1975.html[N1975],
Filesystem Library Proposal for TR2, accepted for Library Technical
Report 2 (TR2) at the Berlin meeting, included additional components to
supplement the Standard Library's Diagnostics clause. Since then, these error
reporting components have received wider public scrutiny and enhancements have
been made to the design. The enhanced version has been used by
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2054.pdf[N2054],
Networking Library Proposal for TR2, demonstrating that these error reporting
components are useful beyond the original Filesystem Library.
The original proposal viewed error categories as a binary choice between
`errno` (i.e. POSIX-style) and the native operating system's error
codes. The proposed components now allow as many additional error categories as
are needed by either implementations or by users. The need to support additional
error categories, for example, occurs in some networking library implementations
because they are built on top of the POSIX `getaddrinfo` API that
uses error codes not based on `errno`.

View File

@@ -0,0 +1,78 @@
////
Copyright 2003-2017 Beman Dawes
Copyright 2018, 2021 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt
////
[#introduction]
# Introduction
:idprefix: intro_
Errors originating from the operating system or other low-level application
program interfaces (APIs) are typically reported via an integer representing
an error code, either by returning the code directly from the function (e.g.
`pthread_mutex_init`) or by using a side channel such as the `errno`
pseudo-variable under POSIX or `GetLastError()` under Windows.
However, these integer error values can only be interpreted when their source
is known. The value 5 under Windows means `ERROR_ACCESS_DENIED` when returned
by `GetLastError()`, but `EIO` when retrieved from `errno`. And conversely,
the same error condition "access denied" is represented by the value 5 when
returned by `GetLastError()` and 13 (`EACCES`) when retrieved from `errno`.
This means that in order for code to be able to handle errors from both
sources (to retrieve a text message describing the error, or to check whether
the error means "access denied"), it needs to know where the integer error
value originated. For this to be possible, the integer error value needs to
be accompanied by a piece of information identifying the source.
Boost.System provides a framework in which this is possible. Errors are
represented by a class `error_code` which contains both the error value and
a pointer to their source (called "category"), represented as a class derived
from `error_category`.
The category provides member functions such as `message`, which returns a text
message for a specific error value, and `equivalent`, which can be used to test
whether a specific error value correspond to an error condition such as "access
denied". `error_code` uses these category-provided functions in the
implementation of its `message` and `operator==` member functions.
Boost.System contains two predefined category classes, the generic category
(a reference to which is returned by `generic_category()`) and the system
category (`system_category()`). The generic category represents the error
values of the portable subset of `errno` values defined by the POSIX standard,
whereas the system category is OS dependent. Under POSIX, the system category
represents the `errno` values returned by the OS APIs (a superset of those in
the generic category), whereas under Windows, the system category represents
the error values returned by `GetLastError()`.
The framework is extensible. Users can define their own categories by
deriving a class from `error_category` and implementing a function that
returns a reference to an instance of it. This capability is useful both for
describing library-defined error values, and for adapting existing C API
libraries that return integer error values.
For those who prefer error reporting via exceptions, Boost.System provides
a standard exception class `system_error` that stores an `error_code`.
Boost.System was standardized in {cpp}11 as `<system_error>`. For a while,
the two were equivalent, but Boost.System has evolved since then and now
contains a number of extensions over its standard sibling:
* A non-allocating overload of `message`;
* Support for nonzero error codes meaning success, via the `failed` member
functions;
* Support for 64 bit category identifiers, as a solution to the problem
that sometimes it's not possible to ensure that only one instance of a
category exists in the program;
* Support for attaching source locations (file/line/function) to error codes;
* A class `result<T>` that can be used to return either a value or an error
code from a function;
* Various other minor improvements.
`boost::system::error_code` can be converted to, and constructed from,
`std::error_code`.

View File

@@ -0,0 +1,27 @@
////
Copyright 2003-2017 Beman Dawes
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt
////
[#rationale]
# Design Rationale
:idprefix: rationale_
`error_code` and `error_condition` are designed as value types so
they can be copied without slicing and do not require heap allocation, but
still have polymorphic behavior based on the error category. This is achieved
by abstract base class `error_category` supplying the polymorphic behavior,
and `error_code` and `error_condition` containing a pointer to an object of a
type derived from `error_category`.
Many of the detailed design decisions were driven by the requirements that
users to be able to add additional error categories, and that it be no more
difficult to write portable code than system-specific code.
The `operator<<` overload for `error_code` eliminates a misleading conversion to
`bool` in code like `cout << ec`, where `ec` is of type `error_code`. It is also
useful in its own right.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
// Boost cerrno.hpp header -------------------------------------------------//
// Copyright Beman Dawes 2005.
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_CERRNO_HPP_INCLUDED
#define BOOST_CERRNO_HPP_INCLUDED
#include <boost/system/detail/cerrno.hpp>
#endif // #ifndef BOOST_CERRNO_HPP_INCLUDED

View File

@@ -0,0 +1,18 @@
#ifndef BOOST_SYSTEM_HPP_INCLUDED
#define BOOST_SYSTEM_HPP_INCLUDED
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#include <boost/config.hpp>
#if (__cplusplus >= 201103L) && !(defined(BOOST_GCC) && BOOST_GCC < 40800) || (defined(_MSC_VER) && _MSC_VER >= 1900)
# include <boost/system/result.hpp>
#endif
#endif // #ifndef BOOST_SYSTEM_HPP_INCLUDED

View File

@@ -0,0 +1,42 @@
// boost/system/api_config.hpp -------------------------------------------------------//
// Copyright Beman Dawes 2003, 2006, 2010
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/system for documentation.
//--------------------------------------------------------------------------------------//
// Boost.System calls operating system API functions to implement system error category
// functions. Usually there is no question as to which API is to be used.
//
// In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are
// available. Chaos ensues if other code thinks one is in use when Boost.System was
// actually built with the other. This header centralizes the API choice and prevents
// user definition of API macros, thus elminating the possibility of mismatches and the
// need to test configurations with little or no practical value.
//
//--------------------------------------------------------------------------------------//
#ifndef BOOST_SYSTEM_API_CONFIG_HPP
#define BOOST_SYSTEM_API_CONFIG_HPP
# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API)
# error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
# endif
// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use
// Cygwin/MinGW does not predefine _WIN32.
// Standalone MinGW and all other known Windows compilers do predefine _WIN32
// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
# define BOOST_WINDOWS_API
# else
# define BOOST_POSIX_API
# endif
#endif // BOOST_SYSTEM_API_CONFIG_HPP

View File

@@ -0,0 +1,50 @@
// boost/system/config.hpp -----------------------------------------------------------//
// Copyright Beman Dawes 2003, 2006
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/system for documentation.
#ifndef BOOST_SYSTEM_CONFIG_HPP
#define BOOST_SYSTEM_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
// This header implemented separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
//
// It's only retained for compatibility now that the library is header-only.
// normalize macros ------------------------------------------------------------------//
#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
&& !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
# define BOOST_SYSTEM_STATIC_LINK
#endif
#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
# define BOOST_SYSTEM_DYN_LINK
#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
# define BOOST_SYSTEM_STATIC_LINK
#endif
#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
#endif
// enable dynamic or static linking as requested --------------------------------------//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
# if defined(BOOST_SYSTEM_SOURCE)
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
# else
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
# endif
#else
# define BOOST_SYSTEM_DECL
#endif
#endif // BOOST_SYSTEM_CONFIG_HPP

View File

@@ -0,0 +1,63 @@
// boost/system/cygwin_error.hpp -------------------------------------------//
// Copyright Beman Dawes 2007
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_SYSTEM_CYGWIN_ERROR_HPP
#define BOOST_SYSTEM_CYGWIN_ERROR_HPP
#include <boost/config/pragma_message.hpp>
#if !defined(BOOST_ALLOW_DEPRECATED_HEADERS)
BOOST_PRAGMA_MESSAGE("This header is deprecated and is slated for removal."
" If you want it retained, please open an issue in github.com/boostorg/system.")
#endif
// This header is effectively empty for compiles on operating systems where
// it is not applicable.
# ifdef __CYGWIN__
#include <boost/system/error_code.hpp>
namespace boost
{
namespace system
{
// To construct an error_code after a API error:
//
// error_code( errno, system_category() )
// User code should use the portable "posix" enums for POSIX errors; this
// allows such code to be portable to non-POSIX systems. For the non-POSIX
// errno values that POSIX-based systems typically provide in addition to
// POSIX values, use the system specific enums below.
namespace cygwin_error
{
enum cygwin_errno
{
no_net = ENONET,
no_package = ENOPKG,
no_share = ENOSHARE
};
} // namespace cygwin_error
template<> struct is_error_code_enum<cygwin_error::cygwin_errno>
{ static const bool value = true; };
namespace cygwin_error
{
inline error_code make_error_code( cygwin_errno e )
{ return error_code( e, system_category() ); }
}
}
}
#endif // __CYGWIN__
#endif // BOOST_SYSTEM_CYGWIN_ERROR_HPP

View File

@@ -0,0 +1,32 @@
#ifndef BOOST_SYSTEM_DETAIL_APPEND_INT_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_APPEND_INT_HPP_INCLUDED
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt)
#include <boost/system/detail/snprintf.hpp>
#include <string>
//
namespace boost
{
namespace system
{
namespace detail
{
inline void append_int( std::string& s, int v )
{
char buffer[ 32 ];
detail::snprintf( buffer, sizeof( buffer ), ":%d", v );
s += buffer;
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_APPEND_INT_HPP_INCLUDED

View File

@@ -0,0 +1,329 @@
// Copyright Beman Dawes 2005.
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_SYSTEM_DETAIL_CERRNO_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_CERRNO_HPP_INCLUDED
#include <cerrno>
// supply errno values likely to be missing, particularly on Windows
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT 9901
#endif
#ifndef EADDRINUSE
#define EADDRINUSE 9902
#endif
#ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL 9903
#endif
#ifndef EISCONN
#define EISCONN 9904
#endif
#ifndef EBADMSG
#define EBADMSG 9905
#endif
#ifndef ECONNABORTED
#define ECONNABORTED 9906
#endif
#ifndef EALREADY
#define EALREADY 9907
#endif
#ifndef ECONNREFUSED
#define ECONNREFUSED 9908
#endif
#ifndef ECONNRESET
#define ECONNRESET 9909
#endif
#ifndef EDESTADDRREQ
#define EDESTADDRREQ 9910
#endif
#ifndef EHOSTUNREACH
#define EHOSTUNREACH 9911
#endif
#ifndef EIDRM
#define EIDRM 9912
#endif
#ifndef EMSGSIZE
#define EMSGSIZE 9913
#endif
#ifndef ENETDOWN
#define ENETDOWN 9914
#endif
#ifndef ENETRESET
#define ENETRESET 9915
#endif
#ifndef ENETUNREACH
#define ENETUNREACH 9916
#endif
#ifndef ENOBUFS
#define ENOBUFS 9917
#endif
#ifndef ENOLINK
#define ENOLINK 9918
#endif
#ifndef ENODATA
#define ENODATA 9919
#endif
#ifndef ENOMSG
#define ENOMSG 9920
#endif
#ifndef ENOPROTOOPT
#define ENOPROTOOPT 9921
#endif
#ifndef ENOSR
#define ENOSR 9922
#endif
#ifndef ENOTSOCK
#define ENOTSOCK 9923
#endif
#ifndef ENOSTR
#define ENOSTR 9924
#endif
#ifndef ENOTCONN
#define ENOTCONN 9925
#endif
#ifndef ENOTSUP
#define ENOTSUP 9926
#endif
#ifndef ECANCELED
#define ECANCELED 9927
#endif
#ifndef EINPROGRESS
#define EINPROGRESS 9928
#endif
#ifndef EOPNOTSUPP
#define EOPNOTSUPP 9929
#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK 9930
#endif
#ifndef EOWNERDEAD
#define EOWNERDEAD 9931
#endif
#ifndef EPROTO
#define EPROTO 9932
#endif
#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT 9933
#endif
#ifndef ENOTRECOVERABLE
#define ENOTRECOVERABLE 9934
#endif
#ifndef ETIME
#define ETIME 9935
#endif
#ifndef ETXTBSY
#define ETXTBSY 9936
#endif
#ifndef ETIMEDOUT
#define ETIMEDOUT 9938
#endif
#ifndef ELOOP
#define ELOOP 9939
#endif
#ifndef EOVERFLOW
#define EOVERFLOW 9940
#endif
#ifndef EPROTOTYPE
#define EPROTOTYPE 9941
#endif
#ifndef ENOSYS
#define ENOSYS 9942
#endif
#ifndef EINVAL
#define EINVAL 9943
#endif
#ifndef ERANGE
#define ERANGE 9944
#endif
#ifndef EILSEQ
#define EILSEQ 9945
#endif
// Windows Mobile doesn't appear to define these:
#ifndef E2BIG
#define E2BIG 9946
#endif
#ifndef EDOM
#define EDOM 9947
#endif
#ifndef EFAULT
#define EFAULT 9948
#endif
#ifndef EBADF
#define EBADF 9949
#endif
#ifndef EPIPE
#define EPIPE 9950
#endif
#ifndef EXDEV
#define EXDEV 9951
#endif
#ifndef EBUSY
#define EBUSY 9952
#endif
#ifndef ENOTEMPTY
#define ENOTEMPTY 9953
#endif
#ifndef ENOEXEC
#define ENOEXEC 9954
#endif
#ifndef EEXIST
#define EEXIST 9955
#endif
#ifndef EFBIG
#define EFBIG 9956
#endif
#ifndef ENAMETOOLONG
#define ENAMETOOLONG 9957
#endif
#ifndef ENOTTY
#define ENOTTY 9958
#endif
#ifndef EINTR
#define EINTR 9959
#endif
#ifndef ESPIPE
#define ESPIPE 9960
#endif
#ifndef EIO
#define EIO 9961
#endif
#ifndef EISDIR
#define EISDIR 9962
#endif
#ifndef ECHILD
#define ECHILD 9963
#endif
#ifndef ENOLCK
#define ENOLCK 9964
#endif
#ifndef ENOSPC
#define ENOSPC 9965
#endif
#ifndef ENXIO
#define ENXIO 9966
#endif
#ifndef ENODEV
#define ENODEV 9967
#endif
#ifndef ENOENT
#define ENOENT 9968
#endif
#ifndef ESRCH
#define ESRCH 9969
#endif
#ifndef ENOTDIR
#define ENOTDIR 9970
#endif
#ifndef ENOMEM
#define ENOMEM 9971
#endif
#ifndef EPERM
#define EPERM 9972
#endif
#ifndef EACCES
#define EACCES 9973
#endif
#ifndef EROFS
#define EROFS 9974
#endif
#ifndef EDEADLK
#define EDEADLK 9975
#endif
#ifndef EAGAIN
#define EAGAIN 9976
#endif
#ifndef ENFILE
#define ENFILE 9977
#endif
#ifndef EMFILE
#define EMFILE 9978
#endif
#ifndef EMLINK
#define EMLINK 9979
#endif
#endif // #ifndef BOOST_SYSTEM_DETAIL_CERRNO_HPP_INCLUDED

View File

@@ -0,0 +1,81 @@
#ifndef BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
// Copyright 2018-2022 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/system for documentation.
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
// BOOST_SYSTEM_HAS_SYSTEM_ERROR
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_CXX11_HDR_ATOMIC)
# define BOOST_SYSTEM_HAS_SYSTEM_ERROR
#endif
// BOOST_SYSTEM_NOEXCEPT
// Retained for backward compatibility
#define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
// BOOST_SYSTEM_HAS_CONSTEXPR
#if !defined(BOOST_NO_CXX14_CONSTEXPR)
# define BOOST_SYSTEM_HAS_CONSTEXPR
#endif
#if BOOST_WORKAROUND(BOOST_GCC, < 60000)
# undef BOOST_SYSTEM_HAS_CONSTEXPR
#endif
#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
# define BOOST_SYSTEM_CONSTEXPR constexpr
#else
# define BOOST_SYSTEM_CONSTEXPR
#endif
// BOOST_SYSTEM_DEPRECATED
#if defined(__clang__)
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
#elif defined(__GNUC__)
# if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
# else
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated))
# endif
#elif defined(_MSC_VER)
# define BOOST_SYSTEM_DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__sun)
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
# define BOOST_SYSTEM_DEPRECATED(msg)
#endif
// BOOST_SYSTEM_CLANG_6
#if defined(__clang__) && (__clang_major__ < 7 || (defined(__APPLE__) && __clang_major__ < 11))
# define BOOST_SYSTEM_CLANG_6
#endif
//
#if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 50000
# define BOOST_SYSTEM_AVOID_STD_GENERIC_CATEGORY
#endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER == 1800) || (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 90000)
// Under Cygwin (and MinGW!), std::system_category() is POSIX
// Under VS2013, std::system_category() isn't quite right
// Under libstdc++ before 7.4, before 8.3, before 9.1, default_error_condition
// for the system category returns a condition from the system category
# define BOOST_SYSTEM_AVOID_STD_SYSTEM_CATEGORY
#endif
#endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED

View File

@@ -0,0 +1,32 @@
#ifndef BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
namespace boost
{
namespace system
{
namespace detail
{
template<bool C, class T = void> struct enable_if
{
typedef T type;
};
template<class T> struct enable_if<false, T>
{
};
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED

View File

@@ -0,0 +1,126 @@
#ifndef BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018, 2020
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/is_error_condition_enum.hpp>
#include <boost/system/detail/cerrno.hpp>
namespace boost
{
namespace system
{
namespace errc
{
enum errc_t
{
success = 0,
address_family_not_supported = EAFNOSUPPORT,
address_in_use = EADDRINUSE,
address_not_available = EADDRNOTAVAIL,
already_connected = EISCONN,
argument_list_too_long = E2BIG,
argument_out_of_domain = EDOM,
bad_address = EFAULT,
bad_file_descriptor = EBADF,
bad_message = EBADMSG,
broken_pipe = EPIPE,
connection_aborted = ECONNABORTED,
connection_already_in_progress = EALREADY,
connection_refused = ECONNREFUSED,
connection_reset = ECONNRESET,
cross_device_link = EXDEV,
destination_address_required = EDESTADDRREQ,
device_or_resource_busy = EBUSY,
directory_not_empty = ENOTEMPTY,
executable_format_error = ENOEXEC,
file_exists = EEXIST,
file_too_large = EFBIG,
filename_too_long = ENAMETOOLONG,
function_not_supported = ENOSYS,
host_unreachable = EHOSTUNREACH,
identifier_removed = EIDRM,
illegal_byte_sequence = EILSEQ,
inappropriate_io_control_operation = ENOTTY,
interrupted = EINTR,
invalid_argument = EINVAL,
invalid_seek = ESPIPE,
io_error = EIO,
is_a_directory = EISDIR,
message_size = EMSGSIZE,
network_down = ENETDOWN,
network_reset = ENETRESET,
network_unreachable = ENETUNREACH,
no_buffer_space = ENOBUFS,
no_child_process = ECHILD,
no_link = ENOLINK,
no_lock_available = ENOLCK,
no_message_available = ENODATA,
no_message = ENOMSG,
no_protocol_option = ENOPROTOOPT,
no_space_on_device = ENOSPC,
no_stream_resources = ENOSR,
no_such_device_or_address = ENXIO,
no_such_device = ENODEV,
no_such_file_or_directory = ENOENT,
no_such_process = ESRCH,
not_a_directory = ENOTDIR,
not_a_socket = ENOTSOCK,
not_a_stream = ENOSTR,
not_connected = ENOTCONN,
not_enough_memory = ENOMEM,
not_supported = ENOTSUP,
operation_canceled = ECANCELED,
operation_in_progress = EINPROGRESS,
operation_not_permitted = EPERM,
operation_not_supported = EOPNOTSUPP,
operation_would_block = EWOULDBLOCK,
owner_dead = EOWNERDEAD,
permission_denied = EACCES,
protocol_error = EPROTO,
protocol_not_supported = EPROTONOSUPPORT,
read_only_file_system = EROFS,
resource_deadlock_would_occur = EDEADLK,
resource_unavailable_try_again = EAGAIN,
result_out_of_range = ERANGE,
state_not_recoverable = ENOTRECOVERABLE,
stream_timeout = ETIME,
text_file_busy = ETXTBSY,
timed_out = ETIMEDOUT,
too_many_files_open_in_system = ENFILE,
too_many_files_open = EMFILE,
too_many_links = EMLINK,
too_many_symbolic_link_levels = ELOOP,
value_too_large = EOVERFLOW,
wrong_protocol_type = EPROTOTYPE
};
} // namespace errc
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
namespace posix = errc;
namespace posix_error = errc;
#endif
template<> struct is_error_condition_enum<errc::errc_t>
{
static const bool value = true;
};
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED

View File

@@ -0,0 +1,198 @@
#ifndef BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/config.hpp>
#include <boost/cstdint.hpp>
#include <boost/config.hpp>
#include <string>
#include <functional>
#include <cstddef>
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
# include <system_error>
# include <atomic>
#endif
namespace boost
{
namespace system
{
class error_category;
class error_code;
class error_condition;
std::size_t hash_value( error_code const & ec );
namespace detail
{
BOOST_SYSTEM_CONSTEXPR bool failed_impl( int ev, error_category const & cat );
class std_category;
} // namespace detail
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
class BOOST_SYMBOL_VISIBLE error_category
{
private:
friend std::size_t hash_value( error_code const & ec );
friend BOOST_SYSTEM_CONSTEXPR bool detail::failed_impl( int ev, error_category const & cat );
friend class error_code;
friend class error_condition;
#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
public:
error_category( error_category const & ) = delete;
error_category& operator=( error_category const & ) = delete;
#else
private:
error_category( error_category const & );
error_category& operator=( error_category const & );
#endif
private:
boost::ulong_long_type id_;
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
mutable std::atomic< boost::system::detail::std_category* > ps_;
#else
boost::system::detail::std_category* ps_;
#endif
protected:
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
~error_category() = default;
#else
// We'd like to make the destructor protected, to make code that deletes
// an error_category* not compile; unfortunately, doing the below makes
// the destructor user-provided and hence breaks use after main, as the
// categories may get destroyed before code that uses them
// ~error_category() {}
#endif
BOOST_SYSTEM_CONSTEXPR error_category() BOOST_NOEXCEPT: id_( 0 ), ps_()
{
}
explicit BOOST_SYSTEM_CONSTEXPR error_category( boost::ulong_long_type id ) BOOST_NOEXCEPT: id_( id ), ps_()
{
}
public:
virtual const char * name() const BOOST_NOEXCEPT = 0;
virtual error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT;
virtual bool equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT;
virtual bool equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT;
virtual std::string message( int ev ) const = 0;
virtual char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
virtual bool failed( int ev ) const BOOST_NOEXCEPT
{
return ev != 0;
}
friend BOOST_SYSTEM_CONSTEXPR bool operator==( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
{
return rhs.id_ == 0? &lhs == &rhs: lhs.id_ == rhs.id_;
}
friend BOOST_SYSTEM_CONSTEXPR bool operator!=( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
friend BOOST_SYSTEM_CONSTEXPR bool operator<( error_category const & lhs, error_category const & rhs ) BOOST_NOEXCEPT
{
if( lhs.id_ < rhs.id_ )
{
return true;
}
if( lhs.id_ > rhs.id_ )
{
return false;
}
if( rhs.id_ != 0 )
{
return false; // equal
}
return std::less<error_category const *>()( &lhs, &rhs );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
# if defined(__SUNPRO_CC) // trailing __global is not supported
operator std::error_category const & () const;
# else
operator std::error_category const & () const BOOST_SYMBOL_VISIBLE;
# endif
#endif
};
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic pop
#endif
namespace detail
{
static const boost::ulong_long_type generic_category_id = ( boost::ulong_long_type( 0xB2AB117A ) << 32 ) + 0x257EDFD0;
static const boost::ulong_long_type system_category_id = generic_category_id + 1;
static const boost::ulong_long_type interop_category_id = generic_category_id + 2;
BOOST_SYSTEM_CONSTEXPR inline bool failed_impl( int ev, error_category const & cat )
{
if( cat.id_ == system_category_id || cat.id_ == generic_category_id )
{
return ev != 0;
}
else
{
return cat.failed( ev );
}
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,164 @@
#ifndef BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_IMPL_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_IMPL_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/detail/error_code.hpp>
#include <boost/system/detail/snprintf.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
#include <string>
#include <cstring>
namespace boost
{
namespace system
{
// error_category default implementation
inline error_condition error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
{
return error_condition( ev, *this );
}
inline bool error_category::equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT
{
return default_error_condition( code ) == condition;
}
inline bool error_category::equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT
{
return code.equals( condition, *this );
}
inline char const * error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
if( len == 0 )
{
return buffer;
}
if( len == 1 )
{
buffer[0] = 0;
return buffer;
}
#if !defined(BOOST_NO_EXCEPTIONS)
try
#endif
{
std::string m = this->message( ev );
# if defined( BOOST_MSVC )
# pragma warning( push )
# pragma warning( disable: 4996 )
# elif defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic push
# if __has_warning("-Wdeprecated-declarations")
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif
# endif
std::strncpy( buffer, m.c_str(), len - 1 );
buffer[ len-1 ] = 0;
# if defined( BOOST_MSVC )
# pragma warning( pop )
# elif defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic pop
# endif
return buffer;
}
#if !defined(BOOST_NO_EXCEPTIONS)
catch( ... )
{
detail::snprintf( buffer, len, "No message text available for error %d", ev );
return buffer;
}
#endif
}
} // namespace system
} // namespace boost
// interoperability with std::error_code, std::error_condition
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
#include <boost/system/detail/std_category.hpp>
namespace boost
{
namespace system
{
inline error_category::operator std::error_category const & () const
{
if( id_ == detail::generic_category_id )
{
// This condition must be the same as the one in error_condition.hpp
#if defined(BOOST_SYSTEM_AVOID_STD_GENERIC_CATEGORY)
static const boost::system::detail::std_category generic_instance( this, 0x1F4D3 );
return generic_instance;
#else
return std::generic_category();
#endif
}
if( id_ == detail::system_category_id )
{
// This condition must be the same as the one in error_code.hpp
#if defined(BOOST_SYSTEM_AVOID_STD_SYSTEM_CATEGORY)
static const boost::system::detail::std_category system_instance( this, 0x1F4D7 );
return system_instance;
#else
return std::system_category();
#endif
}
detail::std_category* p = ps_.load( std::memory_order_acquire );
if( p != 0 )
{
return *p;
}
detail::std_category* q = new detail::std_category( this, 0 );
if( ps_.compare_exchange_strong( p, q, std::memory_order_release, std::memory_order_acquire ) )
{
return *q;
}
else
{
delete q;
return *p;
}
}
} // namespace system
} // namespace boost
#endif // #if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
#endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_IMPL_HPP_INCLUDED

View File

@@ -0,0 +1,716 @@
#ifndef BOOST_SYSTEM_DETAIL_ERROR_CODE_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ERROR_CODE_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017-2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/is_error_code_enum.hpp>
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/detail/system_category.hpp>
#include <boost/system/detail/system_category_impl.hpp>
#include <boost/system/detail/interop_category.hpp>
#include <boost/system/detail/enable_if.hpp>
#include <boost/system/detail/is_same.hpp>
#include <boost/system/detail/append_int.hpp>
#include <boost/system/detail/snprintf.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/assert/source_location.hpp>
#include <boost/cstdint.hpp>
#include <boost/config.hpp>
#include <ostream>
#include <new>
#include <cstdio>
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
# include <system_error>
#endif
#if defined(BOOST_GCC) && BOOST_GCC >= 40600 && BOOST_GCC < 70000
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
namespace boost
{
namespace system
{
// class error_code
// We want error_code to be a value type that can be copied without slicing
// and without requiring heap allocation, but we also want it to have
// polymorphic behavior based on the error category. This is achieved by
// abstract base class error_category supplying the polymorphic behavior,
// and error_code containing a pointer to an object of a type derived
// from error_category.
std::size_t hash_value( error_code const & ec );
class error_code
{
private:
friend std::size_t hash_value( error_code const & ec );
private:
struct data
{
int val_;
const error_category * cat_;
};
union
{
data d1_;
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
unsigned char d2_[ sizeof(std::error_code) ];
#endif
};
// 0: default constructed, d1_ value initialized
// 1: holds std::error_code in d2_
// 2: holds error code in d1_, failed == false
// 3: holds error code in d1_, failed == true
// >3: pointer to source_location, failed_ in lsb
boost::uintptr_t lc_flags_;
private:
char const* category_name() const BOOST_NOEXCEPT
{
// return category().name();
if( lc_flags_ == 0 )
{
// must match detail::system_error_category::name()
return "system";
}
else if( lc_flags_ == 1 )
{
// must match detail::interop_error_category::name()
return "std:unknown";
}
else
{
return d1_.cat_->name();
}
}
public:
// constructors:
BOOST_SYSTEM_CONSTEXPR error_code() BOOST_NOEXCEPT:
d1_(), lc_flags_( 0 )
{
}
BOOST_SYSTEM_CONSTEXPR error_code( int val, const error_category & cat ) BOOST_NOEXCEPT:
d1_(), lc_flags_( 2 + detail::failed_impl( val, cat ) )
{
d1_.val_ = val;
d1_.cat_ = &cat;
}
error_code( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT:
d1_(), lc_flags_( ( loc? reinterpret_cast<boost::uintptr_t>( loc ): 2 ) | +detail::failed_impl( val, cat ) )
{
d1_.val_ = val;
d1_.cat_ = &cat;
}
template<class ErrorCodeEnum> BOOST_SYSTEM_CONSTEXPR error_code( ErrorCodeEnum e,
typename detail::enable_if<
is_error_code_enum<ErrorCodeEnum>::value
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|| std::is_error_code_enum<ErrorCodeEnum>::value
#endif
>::type* = 0 ) BOOST_NOEXCEPT: d1_(), lc_flags_( 0 )
{
*this = make_error_code( e );
}
template<class ErrorCodeEnum> error_code( ErrorCodeEnum e, source_location const * loc,
typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value>::type* = 0 ) BOOST_NOEXCEPT:
d1_(), lc_flags_( 0 )
{
error_code e2 = make_error_code( e );
if( e2.lc_flags_ == 0 || e2.lc_flags_ == 1 )
{
*this = e2;
}
else
{
*this = error_code( e2.d1_.val_, *e2.d1_.cat_, loc );
}
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
error_code( std::error_code const& ec ) BOOST_NOEXCEPT:
lc_flags_( 1 )
{
::new( d2_ ) std::error_code( ec );
}
#endif
// modifiers:
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
{
*this = error_code( val, cat );
}
void assign( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT
{
*this = error_code( val, cat, loc );
}
template<typename ErrorCodeEnum>
BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, error_code>::type &
operator=( ErrorCodeEnum val ) BOOST_NOEXCEPT
{
*this = make_error_code( val );
return *this;
}
template<typename ErrorCodeEnum>
typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, void>::type
assign( ErrorCodeEnum val, source_location const * loc ) BOOST_NOEXCEPT
{
*this = error_code( val, loc );
}
BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
{
*this = error_code();
}
// observers:
BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
{
if( lc_flags_ != 1 )
{
return d1_.val_;
}
else
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
unsigned cv = static_cast<unsigned>( ec.value() );
unsigned ch = static_cast<unsigned>( reinterpret_cast<boost::uintptr_t>( &ec.category() ) % 2097143 ); // 2^21-9, prime
return static_cast<int>( cv + 1000 * ch );
#else
return -1;
#endif
}
}
BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
{
if( lc_flags_ == 0 )
{
return system_category();
}
else if( lc_flags_ == 1 )
{
return detail::interop_category();
}
else
{
return *d1_.cat_;
}
}
// deprecated?
error_condition default_error_condition() const BOOST_NOEXCEPT
{
return category().default_error_condition( value() );
}
std::string message() const
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lc_flags_ == 1 )
{
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
return ec.message();
}
#endif
if( lc_flags_ == 0 )
{
return detail::system_error_category_message( value() );
}
else
{
return category().message( value() );
}
}
char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lc_flags_ == 1 )
{
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
#if !defined(BOOST_NO_EXCEPTIONS)
try
#endif
{
detail::snprintf( buffer, len, "%s", ec.message().c_str() );
return buffer;
}
#if !defined(BOOST_NO_EXCEPTIONS)
catch( ... )
{
detail::snprintf( buffer, len, "No message text available for error std:%s:%d", ec.category().name(), ec.value() );
return buffer;
}
#endif
}
#endif
if( lc_flags_ == 0 )
{
return detail::system_error_category_message( value(), buffer, len );
}
else
{
return category().message( value(), buffer, len );
}
}
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
{
if( lc_flags_ & 1 )
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lc_flags_ == 1 )
{
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
return ec.value() != 0;
}
#endif
return true;
}
else
{
return false;
}
}
#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
{
return failed();
}
#else
typedef void (*unspecified_bool_type)();
static void unspecified_bool_true() {}
BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
{
return failed()? unspecified_bool_true: 0;
}
BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
{
return !failed();
}
#endif
bool has_location() const BOOST_NOEXCEPT
{
return lc_flags_ >= 4;
}
source_location const & location() const BOOST_NOEXCEPT
{
BOOST_STATIC_CONSTEXPR source_location loc;
return lc_flags_ >= 4? *reinterpret_cast<source_location const*>( lc_flags_ &~ static_cast<boost::uintptr_t>( 1 ) ): loc;
}
// relationals:
private:
// private equality for use in error_category::equivalent
friend class error_category;
BOOST_SYSTEM_CONSTEXPR bool equals( int val, error_category const& cat ) const BOOST_NOEXCEPT
{
if( lc_flags_ == 0 )
{
return val == 0 && cat.id_ == detail::system_category_id;
}
else if( lc_flags_ == 1 )
{
return cat.id_ == detail::interop_category_id && val == value();
}
else
{
return val == d1_.val_ && cat == *d1_.cat_;
}
}
public:
// the more symmetrical non-member syntax allows enum
// conversions work for both rhs and lhs.
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lhs.lc_flags_ == 1 && rhs.lc_flags_ == 1 )
{
std::error_code const& e1 = *reinterpret_cast<std::error_code const*>( lhs.d2_ );
std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( rhs.d2_ );
return e1 == e2;
}
else
#endif
{
return lhs.value() == rhs.value() && lhs.category() == rhs.category();
}
}
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lhs.lc_flags_ == 1 && rhs.lc_flags_ == 1 )
{
std::error_code const& e1 = *reinterpret_cast<std::error_code const*>( lhs.d2_ );
std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( rhs.d2_ );
return e1 < e2;
}
else
#endif
{
return lhs.category() < rhs.category() || (lhs.category() == rhs.category() && lhs.value() < rhs.value());
}
}
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline friend bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( code.lc_flags_ == 1 )
{
return static_cast<std::error_code>( code ) == static_cast<std::error_condition>( condition );
}
else
#endif
{
return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
}
}
inline friend bool operator==( const error_condition & condition, const error_code & code ) BOOST_NOEXCEPT
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( code.lc_flags_ == 1 )
{
return static_cast<std::error_code>( code ) == static_cast<std::error_condition>( condition );
}
else
#endif
{
return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
}
}
inline friend bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline friend bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
inline friend bool operator==( std::error_code const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return lhs == static_cast< std::error_code >( rhs );
}
inline friend bool operator==( error_code const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
{
return static_cast< std::error_code >( lhs ) == rhs;
}
inline friend bool operator!=( std::error_code const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline friend bool operator!=( error_code const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
//
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
{
return lhs == make_error_condition( rhs );
}
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return make_error_condition( lhs ) == rhs;
}
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type>
inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
//
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
{
return lhs == make_error_code( rhs );
}
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return make_error_code( lhs ) == rhs;
}
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type>
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
#if defined(BOOST_SYSTEM_CLANG_6)
inline friend bool operator==( error_code const & lhs, std::error_condition const & rhs ) BOOST_NOEXCEPT
{
return static_cast< std::error_code >( lhs ) == rhs;
}
inline friend bool operator==( std::error_condition const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return lhs == static_cast< std::error_code >( rhs );
}
inline friend bool operator!=( error_code const & lhs, std::error_condition const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline friend bool operator!=( std::error_condition const & lhs, error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
#endif
// conversions
operator std::error_code () const
{
if( lc_flags_ == 1 )
{
return *reinterpret_cast<std::error_code const*>( d2_ );
}
else if( lc_flags_ == 0 )
{
// This condition must be the same as the one in error_category_impl.hpp
#if defined(BOOST_SYSTEM_AVOID_STD_SYSTEM_CATEGORY)
return std::error_code( 0, boost::system::system_category() );
#else
return std::error_code();
#endif
}
else
{
return std::error_code( d1_.val_, *d1_.cat_ );
}
}
operator std::error_code ()
{
return const_cast<error_code const&>( *this );
}
template<class T,
class E = typename detail::enable_if<detail::is_same<T, std::error_code>::value>::type>
operator T& ()
{
if( lc_flags_ != 1 )
{
std::error_code e2( *this );
::new( d2_ ) std::error_code( e2 );
lc_flags_ = 1;
}
return *reinterpret_cast<std::error_code*>( d2_ );
}
#if defined(BOOST_SYSTEM_CLANG_6)
template<class T,
class E = typename std::enable_if<std::is_same<T, std::error_code>::value>::type>
operator T const& () = delete;
#endif
#endif
std::string to_string() const
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( lc_flags_ == 1 )
{
std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( d2_ );
std::string r( "std:" );
r += e2.category().name();
detail::append_int( r, e2.value() );
return r;
}
else
#endif
{
std::string r = category_name();
detail::append_int( r, value() );
return r;
}
}
template<class Ch, class Tr>
inline friend std::basic_ostream<Ch, Tr>&
operator<< (std::basic_ostream<Ch, Tr>& os, error_code const & ec)
{
return os << ec.to_string().c_str();
}
std::string what() const
{
std::string r = message();
r += " [";
r += to_string();
if( has_location() )
{
r += " at ";
r += location().to_string();
}
r += "]";
return r;
}
};
inline std::size_t hash_value( error_code const & ec )
{
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
if( ec.lc_flags_ == 1 )
{
std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( ec.d2_ );
return std::hash<std::error_code>()( e2 );
}
#endif
error_category const & cat = ec.category();
boost::ulong_long_type id_ = cat.id_;
if( id_ == 0 )
{
id_ = reinterpret_cast<boost::uintptr_t>( &cat );
}
boost::ulong_long_type hv = ( boost::ulong_long_type( 0xCBF29CE4 ) << 32 ) + 0x84222325;
boost::ulong_long_type const prime = ( boost::ulong_long_type( 0x00000100 ) << 32 ) + 0x000001B3;
// id
hv ^= id_;
hv *= prime;
// value
hv ^= static_cast<unsigned>( ec.value() );
hv *= prime;
return static_cast<std::size_t>( hv );
}
} // namespace system
} // namespace boost
#if defined(BOOST_GCC) && BOOST_GCC >= 40600 && BOOST_GCC < 70000
# pragma GCC diagnostic pop
#endif
#endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CODE_HPP_INCLUDED

View File

@@ -0,0 +1,297 @@
#ifndef BOOST_SYSTEM_DETAIL_ERROR_CONDITION_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_ERROR_CONDITION_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017-2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/generic_category.hpp>
#include <boost/system/detail/enable_if.hpp>
#include <boost/system/detail/is_same.hpp>
#include <boost/system/detail/errc.hpp>
#include <boost/system/detail/append_int.hpp>
#include <boost/system/is_error_condition_enum.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace system
{
// class error_condition
// error_conditions are portable, error_codes are system or library specific
namespace detail
{
struct generic_value_tag
{
int value;
BOOST_SYSTEM_CONSTEXPR explicit generic_value_tag( int v ): value( v ) {}
};
} // namespace detail
class error_condition
{
private:
int val_;
error_category const * cat_;
private:
boost::ulong_long_type cat_id() const BOOST_NOEXCEPT
{
return cat_? cat_->id_: detail::generic_category_id;
}
public:
// constructors:
BOOST_SYSTEM_CONSTEXPR error_condition() BOOST_NOEXCEPT:
val_( 0 ), cat_( 0 )
{
}
BOOST_SYSTEM_CONSTEXPR error_condition( int val, const error_category & cat ) BOOST_NOEXCEPT:
val_( val ), cat_( &cat )
{
}
BOOST_SYSTEM_CONSTEXPR explicit error_condition( boost::system::detail::generic_value_tag vt ) BOOST_NOEXCEPT:
val_( vt.value ), cat_( 0 )
{
}
template<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
typename detail::enable_if<
is_error_condition_enum<ErrorConditionEnum>::value && !boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value
>::type* = 0) BOOST_NOEXCEPT
{
*this = make_error_condition( e );
}
template<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) BOOST_NOEXCEPT:
val_( e ), cat_( 0 )
{
}
// modifiers:
BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
{
val_ = val;
cat_ = &cat;
}
template<typename ErrorConditionEnum>
BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value, error_condition>::type &
operator=( ErrorConditionEnum val ) BOOST_NOEXCEPT
{
*this = error_condition( val );
return *this;
}
BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
{
val_ = 0;
cat_ = 0;
}
// observers:
BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
{
return val_;
}
BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
{
return cat_? *cat_: generic_category();
}
std::string message() const
{
if( cat_ )
{
return cat_->message( value() );
}
else
{
return detail::generic_error_category_message( value() );
}
}
char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
if( cat_ )
{
return cat_->message( value(), buffer, len );
}
else
{
return detail::generic_error_category_message( value(), buffer, len );
}
}
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
{
if( cat_ )
{
return detail::failed_impl( val_, *cat_ );
}
else
{
return val_ != 0;
}
}
#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
{
return failed();
}
#else
typedef void (*unspecified_bool_type)();
static void unspecified_bool_true() {}
BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
{
return failed()? unspecified_bool_true: 0;
}
BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
{
return !failed();
}
#endif
// relationals:
// the more symmetrical non-member syntax allows enum
// conversions work for both rhs and lhs.
BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
if( lhs.val_ != rhs.val_ )
{
return false;
}
else if( lhs.cat_ == 0 )
{
return rhs.cat_id() == detail::generic_category_id;
}
else if( rhs.cat_ == 0 )
{
return lhs.cat_id() == detail::generic_category_id;
}
else
{
return *lhs.cat_ == *rhs.cat_;
}
}
BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
error_category const& lcat = lhs.category();
error_category const& rcat = rhs.category();
return lcat < rcat || ( lcat == rcat && lhs.val_ < rhs.val_ );
}
BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
operator std::error_condition () const
{
// This condition must be the same as the one in error_category_impl.hpp
#if defined(BOOST_SYSTEM_AVOID_STD_GENERIC_CATEGORY)
return std::error_condition( value(), category() );
#else
if( cat_ )
{
return std::error_condition( val_, *cat_ );
}
else
{
return std::error_condition( val_, std::generic_category() );
}
#endif
}
inline friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
{
return lhs == static_cast< std::error_condition >( rhs );
}
inline friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
{
return static_cast< std::error_condition >( lhs ) == rhs;
}
inline friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline friend bool operator!=( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
#endif
std::string to_string() const
{
std::string r( "cond:" );
if( cat_ )
{
r += cat_->name();
}
else
{
r += "generic";
}
detail::append_int( r, value() );
return r;
}
template<class Ch, class Tr>
inline friend std::basic_ostream<Ch, Tr>&
operator<< (std::basic_ostream<Ch, Tr>& os, error_condition const & en)
{
os << en.to_string();
return os;
}
};
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CONDITION_HPP_INCLUDED

View File

@@ -0,0 +1,123 @@
#ifndef BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/generic_category_message.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace system
{
namespace detail
{
// generic_error_category
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
class BOOST_SYMBOL_VISIBLE generic_error_category: public error_category
{
public:
BOOST_SYSTEM_CONSTEXPR generic_error_category() BOOST_NOEXCEPT:
error_category( detail::generic_category_id )
{
}
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
{
return "generic";
}
std::string message( int ev ) const BOOST_OVERRIDE;
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
};
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic pop
#endif
// generic_error_category::message
inline char const * generic_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
return generic_error_category_message( ev, buffer, len );
}
inline std::string generic_error_category::message( int ev ) const
{
return generic_error_category_message( ev );
}
} // namespace detail
// generic_category()
#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
namespace detail
{
template<class T> struct BOOST_SYMBOL_VISIBLE generic_cat_holder
{
static constexpr generic_error_category instance{};
};
// Before C++17 it was mandatory to redeclare all static constexpr
#if defined(BOOST_NO_CXX17_INLINE_VARIABLES)
template<class T> constexpr generic_error_category generic_cat_holder<T>::instance;
#endif
} // namespace detail
constexpr error_category const & generic_category() BOOST_NOEXCEPT
{
return detail::generic_cat_holder<void>::instance;
}
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
#if !defined(__SUNPRO_CC) // trailing __global is not supported
inline error_category const & generic_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
#endif
inline error_category const & generic_category() BOOST_NOEXCEPT
{
static const detail::generic_error_category instance;
return instance;
}
#endif // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
// deprecated synonyms
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
BOOST_SYSTEM_DEPRECATED("please use generic_category()") inline const error_category & get_generic_category() { return generic_category(); }
BOOST_SYSTEM_DEPRECATED("please use generic_category()") inline const error_category & get_posix_category() { return generic_category(); }
BOOST_SYSTEM_DEPRECATED("please use generic_category()") static const error_category & posix_category BOOST_ATTRIBUTE_UNUSED = generic_category();
BOOST_SYSTEM_DEPRECATED("please use generic_category()") static const error_category & errno_ecat BOOST_ATTRIBUTE_UNUSED = generic_category();
#endif
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,108 @@
#ifndef BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_MESSAGE_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_MESSAGE_HPP_INCLUDED
// Implementation of generic_error_category_message
//
// Copyright 2018 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/config.hpp>
#include <string>
#include <cstring>
namespace boost
{
namespace system
{
namespace detail
{
#if defined(__GLIBC__)
// glibc has two incompatible strerror_r definitions
inline char const * strerror_r_helper( char const * r, char const * ) BOOST_NOEXCEPT
{
return r;
}
inline char const * strerror_r_helper( int r, char const * buffer ) BOOST_NOEXCEPT
{
return r == 0? buffer: "Unknown error";
}
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
{
return strerror_r_helper( strerror_r( ev, buffer, len ), buffer );
}
inline std::string generic_error_category_message( int ev )
{
char buffer[ 128 ];
return generic_error_category_message( ev, buffer, sizeof( buffer ) );
}
#else // #if defined(__GLIBC__)
// std::strerror is thread-safe on everything else, incl. Windows
# if defined( BOOST_MSVC )
# pragma warning( push )
# pragma warning( disable: 4996 )
# elif defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic push
# if __has_warning("-Wdeprecated-declarations")
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif
# endif
inline std::string generic_error_category_message( int ev )
{
char const * m = std::strerror( ev );
return m? m: "Unknown error";
}
inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
{
if( len == 0 )
{
return buffer;
}
if( len == 1 )
{
buffer[0] = 0;
return buffer;
}
char const * m = std::strerror( ev );
if( m == 0 ) return "Unknown error";
std::strncpy( buffer, m, len - 1 );
buffer[ len-1 ] = 0;
return buffer;
}
# if defined( BOOST_MSVC )
# pragma warning( pop )
# elif defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic pop
# endif
#endif // #if defined(__GLIBC__)
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_GENERIC_CATEGORY_MESSAGE_HPP_INCLUDED

View File

@@ -0,0 +1,107 @@
#ifndef BOOST_SYSTEM_DETAIL_INTEROP_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_INTEROP_CATEGORY_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018, 2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/snprintf.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace system
{
namespace detail
{
// interop_error_category, used for std::error_code
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
class BOOST_SYMBOL_VISIBLE interop_error_category: public error_category
{
public:
BOOST_SYSTEM_CONSTEXPR interop_error_category() BOOST_NOEXCEPT:
error_category( detail::interop_category_id )
{
}
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
{
return "std:unknown";
}
std::string message( int ev ) const BOOST_OVERRIDE;
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
};
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic pop
#endif
inline char const * interop_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
detail::snprintf( buffer, len, "Unknown interop error %d", ev );
return buffer;
}
inline std::string interop_error_category::message( int ev ) const
{
char buffer[ 48 ];
return message( ev, buffer, sizeof( buffer ) );
}
// interop_category()
#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
template<class T> struct BOOST_SYMBOL_VISIBLE interop_cat_holder
{
static constexpr interop_error_category instance{};
};
// Before C++17 it was mandatory to redeclare all static constexpr
#if defined(BOOST_NO_CXX17_INLINE_VARIABLES)
template<class T> constexpr interop_error_category interop_cat_holder<T>::instance;
#endif
constexpr error_category const & interop_category() BOOST_NOEXCEPT
{
return interop_cat_holder<void>::instance;
}
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
#if !defined(__SUNPRO_CC) // trailing __global is not supported
inline error_category const & interop_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
#endif
inline error_category const & interop_category() BOOST_NOEXCEPT
{
static const detail::interop_error_category instance;
return instance;
}
#endif // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_INTEROP_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,33 @@
#ifndef BOOST_SYSTEM_DETAIL_IS_SAME_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_IS_SAME_HPP_INCLUDED
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
namespace boost
{
namespace system
{
namespace detail
{
template<class T1, class T2> struct is_same
{
enum _vt { value = 0 };
};
template<class T> struct is_same<T, T>
{
enum _vt { value = 1 };
};
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_IS_SAME_HPP_INCLUDED

View File

@@ -0,0 +1,73 @@
#ifndef BOOST_SYSTEM_DETAIL_SNPRINTF_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SNPRINTF_HPP_INCLUDED
// Copyright 2018, 2020, 2021 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/config.hpp>
#include <cstdio>
#include <cstdarg>
//
namespace boost
{
namespace system
{
namespace detail
{
#if ( defined(_MSC_VER) && _MSC_VER < 1900 ) || ( defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) )
inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
{
# if defined( BOOST_MSVC )
# pragma warning( push )
# pragma warning( disable: 4996 )
# endif
if( len == 0 ) return;
va_list args;
va_start( args, format );
_vsnprintf( buffer, len - 1, format, args );
buffer[ len - 1 ] = 0;
va_end( args );
# if defined( BOOST_MSVC )
# pragma warning( pop )
# endif
}
#else
#if defined(__GNUC__) && __GNUC__ >= 3
__attribute__((__format__ (__printf__, 3, 4)))
#endif
inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
{
va_list args;
va_start( args, format );
std::vsnprintf( buffer, len, format, args );
va_end( args );
}
#endif
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_SNPRINTF_HPP_INCLUDED

View File

@@ -0,0 +1,141 @@
#ifndef BOOST_SYSTEM_DETAIL_STD_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_STD_CATEGORY_HPP_INCLUDED
// Support for interoperability between Boost.System and <system_error>
//
// Copyright 2018, 2021 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/detail/error_code.hpp>
#include <boost/system/detail/generic_category.hpp>
#include <system_error>
//
namespace boost
{
namespace system
{
namespace detail
{
class BOOST_SYMBOL_VISIBLE std_category: public std::error_category
{
private:
boost::system::error_category const * pc_;
public:
explicit std_category( boost::system::error_category const * pc, unsigned id ): pc_( pc )
{
if( id != 0 )
{
#if defined(_MSC_VER) && defined(_CPPLIB_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000
// Poking into the protected _Addr member of std::error_category
// is not a particularly good programming practice, but what can
// you do
_Addr = id;
#endif
}
}
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
{
return pc_->name();
}
std::string message( int ev ) const BOOST_OVERRIDE
{
return pc_->message( ev );
}
std::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE
{
return pc_->default_error_condition( ev );
}
bool equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
bool equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
};
inline bool std_category::equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT
{
if( condition.category() == *this )
{
boost::system::error_condition bn( condition.value(), *pc_ );
return pc_->equivalent( code, bn );
}
else if( condition.category() == std::generic_category() || condition.category() == boost::system::generic_category() )
{
boost::system::error_condition bn( condition.value(), boost::system::generic_category() );
return pc_->equivalent( code, bn );
}
#ifndef BOOST_NO_RTTI
else if( std_category const* pc2 = dynamic_cast< std_category const* >( &condition.category() ) )
{
boost::system::error_condition bn( condition.value(), *pc2->pc_ );
return pc_->equivalent( code, bn );
}
#endif
else
{
return default_error_condition( code ) == condition;
}
}
inline bool std_category::equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT
{
if( code.category() == *this )
{
boost::system::error_code bc( code.value(), *pc_ );
return pc_->equivalent( bc, condition );
}
else if( code.category() == std::generic_category() || code.category() == boost::system::generic_category() )
{
boost::system::error_code bc( code.value(), boost::system::generic_category() );
return pc_->equivalent( bc, condition );
}
#ifndef BOOST_NO_RTTI
else if( std_category const* pc2 = dynamic_cast< std_category const* >( &code.category() ) )
{
boost::system::error_code bc( code.value(), *pc2->pc_ );
return pc_->equivalent( bc, condition );
}
#endif
else if( *pc_ == boost::system::generic_category() )
{
return std::generic_category().equivalent( code, condition );
}
else
{
return false;
}
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_STD_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,110 @@
#ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace system
{
namespace detail
{
// system_error_category
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
class BOOST_SYMBOL_VISIBLE system_error_category: public error_category
{
public:
BOOST_SYSTEM_CONSTEXPR system_error_category() BOOST_NOEXCEPT:
error_category( detail::system_category_id )
{
}
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
{
return "system";
}
error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
std::string message( int ev ) const BOOST_OVERRIDE;
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
};
#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
#pragma GCC diagnostic pop
#endif
} // namespace detail
// system_category()
#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
namespace detail
{
template<class T> struct BOOST_SYMBOL_VISIBLE system_cat_holder
{
static constexpr system_error_category instance{};
};
// Before C++17 it was mandatory to redeclare all static constexpr
#if defined(BOOST_NO_CXX17_INLINE_VARIABLES)
template<class T> constexpr system_error_category system_cat_holder<T>::instance;
#endif
} // namespace detail
constexpr error_category const & system_category() BOOST_NOEXCEPT
{
return detail::system_cat_holder<void>::instance;
}
#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
#if !defined(__SUNPRO_CC) // trailing __global is not supported
inline error_category const & system_category() BOOST_NOEXCEPT BOOST_SYMBOL_VISIBLE;
#endif
inline error_category const & system_category() BOOST_NOEXCEPT
{
static const detail::system_error_category instance;
return instance;
}
#endif // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
// deprecated synonyms
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
BOOST_SYSTEM_DEPRECATED("please use system_category()") inline const error_category & get_system_category() { return system_category(); }
BOOST_SYSTEM_DEPRECATED("please use system_category()") static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_category();
#endif
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,151 @@
#ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_CONDITION_WIN32_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_CONDITION_WIN32_HPP_INCLUDED
// Copyright Beman Dawes 2002, 2006
// Copyright (c) Microsoft Corporation 2014
// Copyright 2018 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/errc.hpp>
#include <boost/winapi/error_codes.hpp>
#include <boost/config.hpp>
//
namespace boost
{
namespace system
{
namespace detail
{
inline int system_category_condition_win32( int ev ) BOOST_NOEXCEPT
{
// When using the Windows Runtime, most system errors are reported as HRESULTs.
// We want to map the common Win32 errors to their equivalent error condition,
// whether or not they are reported via an HRESULT.
#define BOOST_SYSTEM_FAILED(hr) ((hr) < 0)
#define BOOST_SYSTEM_HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff)
#define BOOST_SYSTEM_HRESULT_CODE(hr) ((hr) & 0xFFFF)
#define BOOST_SYSTEM_FACILITY_WIN32 7
if( BOOST_SYSTEM_FAILED( ev ) && BOOST_SYSTEM_HRESULT_FACILITY( ev ) == BOOST_SYSTEM_FACILITY_WIN32 )
{
ev = BOOST_SYSTEM_HRESULT_CODE( ev );
}
#undef BOOST_SYSTEM_FAILED
#undef BOOST_SYSTEM_HRESULT_FACILITY
#undef BOOST_SYSTEM_HRESULT_CODE
#undef BOOST_SYSTEM_FACILITY_WIN32
using namespace boost::winapi;
using namespace errc;
// Windows system -> posix_errno decode table
// see WinError.h comments for descriptions of errors
switch ( ev )
{
case 0: return success;
case ERROR_ACCESS_DENIED_: return permission_denied;
case ERROR_ALREADY_EXISTS_: return file_exists;
case ERROR_BAD_NETPATH_: return no_such_file_or_directory;
case ERROR_BAD_UNIT_: return no_such_device;
case ERROR_BROKEN_PIPE_: return broken_pipe;
case ERROR_BUFFER_OVERFLOW_: return filename_too_long;
case ERROR_BUSY_: return device_or_resource_busy;
case ERROR_BUSY_DRIVE_: return device_or_resource_busy;
case ERROR_CANNOT_MAKE_: return permission_denied;
case ERROR_CANTOPEN_: return io_error;
case ERROR_CANTREAD_: return io_error;
case ERROR_CANTWRITE_: return io_error;
case ERROR_CONNECTION_ABORTED_: return connection_aborted;
case ERROR_CURRENT_DIRECTORY_: return permission_denied;
case ERROR_DEV_NOT_EXIST_: return no_such_device;
case ERROR_DEVICE_IN_USE_: return device_or_resource_busy;
case ERROR_DIR_NOT_EMPTY_: return directory_not_empty;
case ERROR_DIRECTORY_: return invalid_argument; // WinError.h: "The directory name is invalid"
case ERROR_DISK_FULL_: return no_space_on_device;
case ERROR_FILE_EXISTS_: return file_exists;
case ERROR_FILE_NOT_FOUND_: return no_such_file_or_directory;
case ERROR_HANDLE_DISK_FULL_: return no_space_on_device;
case ERROR_INVALID_ACCESS_: return permission_denied;
case ERROR_INVALID_DRIVE_: return no_such_device;
case ERROR_INVALID_FUNCTION_: return function_not_supported;
case ERROR_INVALID_HANDLE_: return invalid_argument;
case ERROR_INVALID_NAME_: return no_such_file_or_directory;
case ERROR_INVALID_PARAMETER_: return invalid_argument;
case ERROR_LOCK_VIOLATION_: return no_lock_available;
case ERROR_LOCKED_: return no_lock_available;
case ERROR_NEGATIVE_SEEK_: return invalid_argument;
case ERROR_NOACCESS_: return permission_denied;
case ERROR_NOT_ENOUGH_MEMORY_: return not_enough_memory;
case ERROR_NOT_READY_: return resource_unavailable_try_again;
case ERROR_NOT_SAME_DEVICE_: return cross_device_link;
case ERROR_OPEN_FAILED_: return io_error;
case ERROR_OPEN_FILES_: return device_or_resource_busy;
case ERROR_OPERATION_ABORTED_: return operation_canceled;
case ERROR_OUTOFMEMORY_: return not_enough_memory;
case ERROR_PATH_NOT_FOUND_: return no_such_file_or_directory;
case ERROR_READ_FAULT_: return io_error;
case ERROR_REPARSE_TAG_INVALID_: return invalid_argument;
case ERROR_RETRY_: return resource_unavailable_try_again;
case ERROR_SEEK_: return io_error;
case ERROR_SHARING_VIOLATION_: return permission_denied;
case ERROR_NOT_SUPPORTED_: return not_supported; // WinError.h: "The request is not supported."
case ERROR_TOO_MANY_OPEN_FILES_: return too_many_files_open;
case ERROR_WRITE_FAULT_: return io_error;
case ERROR_WRITE_PROTECT_: return permission_denied;
case WSAEACCES_: return permission_denied;
case WSAEADDRINUSE_: return address_in_use;
case WSAEADDRNOTAVAIL_: return address_not_available;
case WSAEAFNOSUPPORT_: return address_family_not_supported;
case WSAEALREADY_: return connection_already_in_progress;
case WSAEBADF_: return bad_file_descriptor;
case WSAECONNABORTED_: return connection_aborted;
case WSAECONNREFUSED_: return connection_refused;
case WSAECONNRESET_: return connection_reset;
case WSAEDESTADDRREQ_: return destination_address_required;
case WSAEFAULT_: return bad_address;
case WSAEHOSTUNREACH_: return host_unreachable;
case WSAEINPROGRESS_: return operation_in_progress;
case WSAEINTR_: return interrupted;
case WSAEINVAL_: return invalid_argument;
case WSAEISCONN_: return already_connected;
case WSAEMFILE_: return too_many_files_open;
case WSAEMSGSIZE_: return message_size;
case WSAENAMETOOLONG_: return filename_too_long;
case WSAENETDOWN_: return network_down;
case WSAENETRESET_: return network_reset;
case WSAENETUNREACH_: return network_unreachable;
case WSAENOBUFS_: return no_buffer_space;
case WSAENOPROTOOPT_: return no_protocol_option;
case WSAENOTCONN_: return not_connected;
case WSAENOTSOCK_: return not_a_socket;
case WSAEOPNOTSUPP_: return operation_not_supported;
case WSAEPROTONOSUPPORT_: return protocol_not_supported;
case WSAEPROTOTYPE_: return wrong_protocol_type;
case WSAETIMEDOUT_: return timed_out;
case WSAEWOULDBLOCK_: return operation_would_block;
default: return -1;
}
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_CONDITION_WIN32_HPP_INCLUDED

View File

@@ -0,0 +1,61 @@
#ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_IMPL_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_IMPL_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018, 2020
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/system_category.hpp>
#include <boost/system/detail/system_category_message.hpp>
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/api_config.hpp>
#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
#endif
// system_error_category implementation
#if defined(BOOST_WINDOWS_API)
#include <boost/system/detail/system_category_condition_win32.hpp>
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
{
int e2 = system_category_condition_win32( ev );
if( e2 == -1 )
{
return error_condition( ev, *this );
}
else
{
return error_condition( boost::system::detail::generic_value_tag( e2 ) );
}
}
#else // #if defined(BOOST_WINDOWS_API)
inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
{
return error_condition( boost::system::detail::generic_value_tag( ev ) );
}
#endif // #if defined(BOOST_WINDOWS_API)
inline std::string boost::system::detail::system_error_category::message( int ev ) const
{
return system_error_category_message( ev );
}
inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
{
return system_error_category_message( ev, buffer, len );
}
#endif // #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_IMPL_HPP_INCLUDED

View File

@@ -0,0 +1,71 @@
#ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_HPP_INCLUDED
// Implementation of system_error_category_message
//
// Copyright 2018, 2022 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/api_config.hpp>
#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
#endif
#if defined(BOOST_WINDOWS_API)
#include <boost/system/detail/system_category_message_win32.hpp>
namespace boost
{
namespace system
{
namespace detail
{
inline std::string system_error_category_message( int ev )
{
return system_category_message_win32( ev );
}
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
{
return system_category_message_win32( ev, buffer, len );
}
} // namespace detail
} // namespace system
} // namespace boost
#else // #if defined(BOOST_WINDOWS_API)
#include <boost/system/detail/generic_category_message.hpp>
namespace boost
{
namespace system
{
namespace detail
{
inline std::string system_error_category_message( int ev )
{
return generic_error_category_message( ev );
}
inline char const * system_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
{
return generic_error_category_message( ev, buffer, len );
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #if defined(BOOST_WINDOWS_API)
#endif // #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_HPP_INCLUDED

View File

@@ -0,0 +1,211 @@
#ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_WIN32_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_WIN32_HPP_INCLUDED
// Copyright Beman Dawes 2002, 2006
// Copyright (c) Microsoft Corporation 2014
// Copyright 2018, 2020 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/snprintf.hpp>
#include <boost/winapi/error_handling.hpp>
#include <boost/winapi/character_code_conversion.hpp>
#include <boost/winapi/local_memory.hpp>
#include <boost/config.hpp>
#include <cstdio>
//
namespace boost
{
namespace system
{
namespace detail
{
inline char const * unknown_message_win32( int ev, char * buffer, std::size_t len )
{
detail::snprintf( buffer, len, "Unknown error (%d)", ev );
return buffer;
}
inline boost::winapi::UINT_ message_cp_win32()
{
#if defined(BOOST_SYSTEM_USE_UTF8)
return boost::winapi::CP_UTF8_;
#else
return boost::winapi::CP_ACP_;
#endif
}
inline char const * system_category_message_win32( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
{
if( len == 0 )
{
return buffer;
}
if( len == 1 )
{
buffer[0] = 0;
return buffer;
}
boost::winapi::UINT_ const code_page = message_cp_win32();
int r = 0;
#if !defined(BOOST_NO_ANSI_APIS)
if( code_page == boost::winapi::CP_ACP_ )
{
using namespace boost::winapi;
DWORD_ retval = boost::winapi::FormatMessageA(
FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
NULL,
ev,
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
buffer,
static_cast<DWORD_>( len ),
NULL
);
r = static_cast<int>( retval );
}
else
#endif
{
using namespace boost::winapi;
wchar_t * lpMsgBuf = 0;
DWORD_ retval = boost::winapi::FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER_ | FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
NULL,
ev,
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
(LPWSTR_) &lpMsgBuf,
0,
NULL
);
if( retval != 0 )
{
r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, buffer, static_cast<int>( len ), NULL, NULL );
boost::winapi::LocalFree( lpMsgBuf );
if ( r != 0 ) --r; // exclude null terminator
}
}
if( r == 0 )
{
return unknown_message_win32( ev, buffer, len );
}
while( r > 0 && ( buffer[ r-1 ] == '\n' || buffer[ r-1 ] == '\r' ) )
{
buffer[ --r ] = 0;
}
if( r > 0 && buffer[ r-1 ] == '.' )
{
buffer[ --r ] = 0;
}
return buffer;
}
struct local_free
{
void * p_;
~local_free()
{
boost::winapi::LocalFree( p_ );
}
};
inline std::string unknown_message_win32( int ev )
{
char buffer[ 38 ];
return unknown_message_win32( ev, buffer, sizeof( buffer ) );
}
inline std::string system_category_message_win32( int ev )
{
using namespace boost::winapi;
wchar_t * lpMsgBuf = 0;
DWORD_ retval = boost::winapi::FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER_ | FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
NULL,
ev,
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
(LPWSTR_) &lpMsgBuf,
0,
NULL
);
if( retval == 0 )
{
return unknown_message_win32( ev );
}
local_free lf_ = { lpMsgBuf };
(void)lf_;
UINT_ const code_page = message_cp_win32();
int r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, 0, 0, NULL, NULL );
if( r == 0 )
{
return unknown_message_win32( ev );
}
std::string buffer( r, char() );
r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, &buffer[0], r, NULL, NULL );
if( r == 0 )
{
return unknown_message_win32( ev );
}
--r; // exclude null terminator
while( r > 0 && ( buffer[ r-1 ] == '\n' || buffer[ r-1 ] == '\r' ) )
{
--r;
}
if( r > 0 && buffer[ r-1 ] == '.' )
{
--r;
}
buffer.resize( r );
return buffer;
}
} // namespace detail
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_MESSAGE_WIN32_HPP_INCLUDED

View File

@@ -0,0 +1,59 @@
#ifndef BOOST_SYSTEM_DETAIL_THROWS_HPP_INCLUDED
#define BOOST_SYSTEM_DETAIL_THROWS_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
namespace boost
{
namespace system
{
class error_code;
} // namespace system
// boost::throws()
namespace detail
{
// Misuse of the error_code object is turned into a noisy failure by
// poisoning the reference. This particular implementation doesn't
// produce warnings or errors from popular compilers, is very efficient
// (as determined by inspecting generated code), and does not suffer
// from order of initialization problems. In practice, it also seems
// cause user function error handling implementation errors to be detected
// very early in the development cycle.
inline system::error_code* throws()
{
// See github.com/boostorg/system/pull/12 by visigoth for why the return
// is poisoned with nonzero rather than (0). A test, test_throws_usage(),
// has been added to error_code_test.cpp, and as visigoth mentioned it
// fails on clang for release builds with a return of 0 but works fine
// with (1).
// Since the undefined behavior sanitizer (-fsanitize=undefined) does not
// allow a reference to be formed to the unaligned address of (1), we use
// (8) instead.
return reinterpret_cast<system::error_code*>(8);
}
} // namespace detail
inline system::error_code& throws()
{
return *detail::throws();
}
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_DETAIL_THROWS_HPP_INCLUDED

View File

@@ -0,0 +1,57 @@
#ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED
#define BOOST_SYSTEM_ERRC_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018, 2020
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/errc.hpp>
#include <boost/system/detail/error_code.hpp>
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/detail/generic_category.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/assert/source_location.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace system
{
// make_* functions for errc::errc_t
namespace errc
{
// explicit conversion:
BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) BOOST_NOEXCEPT
{
return error_code( e, generic_category() );
}
// explicit conversion:
inline error_code make_error_code( errc_t e, boost::source_location const * loc ) BOOST_NOEXCEPT
{
return error_code( e, generic_category(), loc );
}
// implicit conversion:
BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) BOOST_NOEXCEPT
{
return error_condition( e, generic_category() );
}
} // namespace errc
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED

View File

@@ -0,0 +1,13 @@
#ifndef BOOST_SYSTEM_ERROR_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_ERROR_CATEGORY_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_category.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#endif // #ifndef BOOST_SYSTEM_ERROR_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,21 @@
#ifndef BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
#define BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_code.hpp>
#include <boost/system/error_category.hpp>
#include <boost/system/error_condition.hpp>
#include <boost/system/errc.hpp>
#include <boost/system/generic_category.hpp>
#include <boost/system/system_category.hpp>
#include <boost/system/detail/throws.hpp>
#endif // BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED

View File

@@ -0,0 +1,13 @@
#ifndef BOOST_SYSTEM_ERROR_CONDITION_HPP_INCLUDED
#define BOOST_SYSTEM_ERROR_CONDITION_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/error_condition.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#endif // #ifndef BOOST_SYSTEM_ERROR_CONDITION_HPP_INCLUDED

View File

@@ -0,0 +1,13 @@
#ifndef BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/generic_category.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#endif // #ifndef BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,30 @@
#ifndef BOOST_SYSTEM_IS_ERROR_CODE_ENUM_HPP_INCLUDED
#define BOOST_SYSTEM_IS_ERROR_CODE_ENUM_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
namespace boost
{
namespace system
{
class error_code;
template<class T> struct is_error_code_enum
{
static const bool value = false;
};
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_IS_ERROR_CODE_ENUM_HPP_INCLUDED

View File

@@ -0,0 +1,30 @@
#ifndef BOOST_SYSTEM_IS_ERROR_CONDITION_ENUM_HPP_INCLUDED
#define BOOST_SYSTEM_IS_ERROR_CONDITION_ENUM_HPP_INCLUDED
// Copyright Beman Dawes 2006, 2007
// Copyright Christoper Kohlhoff 2007
// Copyright Peter Dimov 2017, 2018
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
namespace boost
{
namespace system
{
class error_condition;
template<class T> struct is_error_condition_enum
{
static const bool value = false;
};
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_IS_ERROR_CONDITION_ENUM_HPP_INCLUDED

View File

@@ -0,0 +1,110 @@
// boost/system/linux_error.hpp -------------------------------------------//
// Copyright Beman Dawes 2007
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_SYSTEM_LINUX_ERROR_HPP
#define BOOST_SYSTEM_LINUX_ERROR_HPP
// This header is effectively empty for compiles on operating systems where
// it is not applicable.
#if defined(linux) || defined(__linux) || defined(__linux__)
#include <boost/system/error_code.hpp>
namespace boost
{
namespace system
{
// To construct an error_code after a API error:
//
// error_code( errno, system_category() )
// User code should use the portable "posix" enums for POSIX errors; this
// allows such code to be portable to non-POSIX systems. For the non-POSIX
// errno values that POSIX-based systems typically provide in addition to
// POSIX values, use the system specific enums below.
namespace linux_error
{
enum linux_errno
{
advertise_error = EADV,
bad_exchange = EBADE,
bad_file_number = EBADFD,
bad_font_format = EBFONT,
bad_request_code = EBADRQC,
bad_request_descriptor = EBADR,
bad_slot = EBADSLT,
channel_range = ECHRNG,
communication_error = ECOMM,
dot_dot_error = EDOTDOT,
exchange_full = EXFULL,
host_down = EHOSTDOWN,
is_named_file_type= EISNAM,
key_expired = EKEYEXPIRED,
key_rejected = EKEYREJECTED,
key_revoked = EKEYREVOKED,
level2_halt= EL2HLT,
level2_no_syncronized= EL2NSYNC,
level3_halt = EL3HLT,
level3_reset = EL3RST,
link_range = ELNRNG,
medium_type = EMEDIUMTYPE,
no_anode= ENOANO,
no_block_device = ENOTBLK,
no_csi = ENOCSI,
no_key = ENOKEY,
no_medium = ENOMEDIUM,
no_network = ENONET,
no_package = ENOPKG,
not_avail = ENAVAIL,
not_named_file_type= ENOTNAM,
not_recoverable = ENOTRECOVERABLE,
not_unique = ENOTUNIQ,
owner_dead = EOWNERDEAD,
protocol_no_supported = EPFNOSUPPORT,
remote_address_changed = EREMCHG,
remote_io_error = EREMOTEIO,
remote_object = EREMOTE,
restart_needed = ERESTART,
shared_library_access = ELIBACC,
shared_library_bad = ELIBBAD,
shared_library_execute = ELIBEXEC,
shared_library_max_ = ELIBMAX,
shared_library_section= ELIBSCN,
shutdown = ESHUTDOWN,
socket_type_not_supported = ESOCKTNOSUPPORT,
srmount_error = ESRMNT,
stream_pipe_error = ESTRPIPE,
too_many_references = ETOOMANYREFS,
too_many_users = EUSERS,
unattached = EUNATCH,
unclean = EUCLEAN
};
} // namespace linux_error
# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
namespace Linux = linux_error;
# endif
template<> struct is_error_code_enum<linux_error::linux_errno>
{ static const bool value = true; };
namespace linux_error
{
inline error_code make_error_code( linux_errno e )
{ return error_code( e, system_category() ); }
}
} // namespace system
} // namespace boost
#endif // Linux
#endif // BOOST_SYSTEM_LINUX_ERROR_HPP

View File

@@ -0,0 +1,567 @@
#ifndef BOOST_SYSTEM_RESULT_HPP_INCLUDED
#define BOOST_SYSTEM_RESULT_HPP_INCLUDED
// Copyright 2017, 2021, 2022 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/system/system_error.hpp>
#include <boost/system/detail/error_code.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#include <boost/variant2/variant.hpp>
#include <boost/throw_exception.hpp>
#include <boost/assert/source_location.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <type_traits>
#include <utility>
#include <iosfwd>
#include <system_error>
#include <exception>
//
namespace boost
{
namespace system
{
// throw_exception_from_error
#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( error_code const & e, boost::source_location const& loc )
{
boost::throw_with_location( system_error( e ), loc );
}
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( errc::errc_t const & e, boost::source_location const& loc )
{
boost::throw_with_location( system_error( make_error_code( e ) ), loc );
}
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( std::error_code const & e, boost::source_location const& loc )
{
boost::throw_with_location( std::system_error( e ), loc );
}
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( std::errc const & e, boost::source_location const& loc )
{
boost::throw_with_location( std::system_error( make_error_code( e ) ), loc );
}
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( std::exception_ptr const & p, boost::source_location const& loc )
{
if( p )
{
std::rethrow_exception( p );
}
else
{
boost::throw_with_location( std::bad_exception(), loc );
}
}
#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8
# pragma GCC diagnostic pop
#endif
// in_place_*
using in_place_value_t = variant2::in_place_index_t<0>;
constexpr in_place_value_t in_place_value{};
using in_place_error_t = variant2::in_place_index_t<1>;
constexpr in_place_error_t in_place_error{};
namespace detail
{
template<class T> using remove_cvref = typename std::remove_cv< typename std::remove_reference<T>::type >::type;
template<class... T> using is_errc_t = std::is_same<mp11::mp_list<remove_cvref<T>...>, mp11::mp_list<errc::errc_t>>;
} // namespace detail
// result
template<class T, class E = error_code> class result
{
private:
variant2::variant<T, E> v_;
public:
// constructors
// default
template<class En2 = void, class En = typename std::enable_if<
std::is_void<En2>::value &&
std::is_default_constructible<T>::value
>::type>
constexpr result()
noexcept( std::is_nothrow_default_constructible<T>::value )
: v_( in_place_value )
{
}
// implicit, value
template<class A = T, typename std::enable_if<
std::is_convertible<A, T>::value &&
!(detail::is_errc_t<A>::value && std::is_arithmetic<T>::value) &&
!std::is_constructible<E, A>::value, int>::type = 0>
constexpr result( A&& a )
noexcept( std::is_nothrow_constructible<T, A>::value )
: v_( in_place_value, std::forward<A>(a) )
{
}
// implicit, error
template<class A = E, class = void, typename std::enable_if<
std::is_convertible<A, E>::value &&
!std::is_constructible<T, A>::value, int>::type = 0>
constexpr result( A&& a )
noexcept( std::is_nothrow_constructible<E, A>::value )
: v_( in_place_error, std::forward<A>(a) )
{
}
// explicit, value
template<class... A, class En = typename std::enable_if<
std::is_constructible<T, A...>::value &&
!(detail::is_errc_t<A...>::value && std::is_arithmetic<T>::value) &&
!std::is_constructible<E, A...>::value
>::type>
explicit constexpr result( A&&... a )
noexcept( std::is_nothrow_constructible<T, A...>::value )
: v_( in_place_value, std::forward<A>(a)... )
{
}
// explicit, error
template<class... A, class En2 = void, class En = typename std::enable_if<
!std::is_constructible<T, A...>::value &&
std::is_constructible<E, A...>::value
>::type>
explicit constexpr result( A&&... a )
noexcept( std::is_nothrow_constructible<E, A...>::value )
: v_( in_place_error, std::forward<A>(a)... )
{
}
// tagged, value
template<class... A, class En = typename std::enable_if<
std::is_constructible<T, A...>::value
>::type>
constexpr result( in_place_value_t, A&&... a )
noexcept( std::is_nothrow_constructible<T, A...>::value )
: v_( in_place_value, std::forward<A>(a)... )
{
}
// tagged, error
template<class... A, class En = typename std::enable_if<
std::is_constructible<E, A...>::value
>::type>
constexpr result( in_place_error_t, A&&... a )
noexcept( std::is_nothrow_constructible<E, A...>::value )
: v_( in_place_error, std::forward<A>(a)... )
{
}
// queries
constexpr bool has_value() const noexcept
{
return v_.index() == 0;
}
constexpr bool has_error() const noexcept
{
return v_.index() != 0;
}
constexpr explicit operator bool() const noexcept
{
return v_.index() == 0;
}
// checked value access
#if defined( BOOST_NO_CXX11_REF_QUALIFIERS )
BOOST_CXX14_CONSTEXPR T value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) const
{
if( has_value() )
{
return variant2::unsafe_get<0>( v_ );
}
else
{
throw_exception_from_error( variant2::unsafe_get<1>( v_ ), loc );
}
}
#else
BOOST_CXX14_CONSTEXPR T& value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) &
{
if( has_value() )
{
return variant2::unsafe_get<0>( v_ );
}
else
{
throw_exception_from_error( variant2::unsafe_get<1>( v_ ), loc );
}
}
BOOST_CXX14_CONSTEXPR T const& value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) const&
{
if( has_value() )
{
return variant2::unsafe_get<0>( v_ );
}
else
{
throw_exception_from_error( variant2::unsafe_get<1>( v_ ), loc );
}
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<std::is_move_constructible<U>::value, T>::type
value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) &&
{
return std::move( value( loc ) );
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<!std::is_move_constructible<U>::value, T&&>::type
value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) &&
{
return std::move( value( loc ) );
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<std::is_move_constructible<U>::value, T>::type
value() const && = delete;
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<!std::is_move_constructible<U>::value, T const&&>::type
value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) const &&
{
return std::move( value( loc ) );
}
#endif
// unchecked value access
BOOST_CXX14_CONSTEXPR T* operator->() noexcept
{
return variant2::get_if<0>( &v_ );
}
BOOST_CXX14_CONSTEXPR T const* operator->() const noexcept
{
return variant2::get_if<0>( &v_ );
}
#if defined( BOOST_NO_CXX11_REF_QUALIFIERS )
BOOST_CXX14_CONSTEXPR T& operator*() noexcept
{
T* p = operator->();
BOOST_ASSERT( p != 0 );
return *p;
}
BOOST_CXX14_CONSTEXPR T const& operator*() const noexcept
{
T const* p = operator->();
BOOST_ASSERT( p != 0 );
return *p;
}
#else
BOOST_CXX14_CONSTEXPR T& operator*() & noexcept
{
T* p = operator->();
BOOST_ASSERT( p != 0 );
return *p;
}
BOOST_CXX14_CONSTEXPR T const& operator*() const & noexcept
{
T const* p = operator->();
BOOST_ASSERT( p != 0 );
return *p;
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<std::is_move_constructible<U>::value, T>::type
operator*() && noexcept(std::is_nothrow_move_constructible<T>::value)
{
return std::move(**this);
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<!std::is_move_constructible<U>::value, T&&>::type
operator*() && noexcept
{
return std::move(**this);
}
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<std::is_move_constructible<U>::value, T>::type
operator*() const && noexcept = delete;
template<class U = T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if<!std::is_move_constructible<U>::value, T const&&>::type
operator*() const && noexcept
{
return std::move(**this);
}
#endif
// error access
constexpr E error() const
noexcept( std::is_nothrow_default_constructible<E>::value && std::is_nothrow_copy_constructible<E>::value )
{
return has_error()? variant2::unsafe_get<1>( v_ ): E();
}
// swap
BOOST_CXX14_CONSTEXPR void swap( result& r )
noexcept( noexcept( v_.swap( r.v_ ) ) )
{
v_.swap( r.v_ );
}
friend BOOST_CXX14_CONSTEXPR void swap( result & r1, result & r2 )
noexcept( noexcept( r1.swap( r2 ) ) )
{
r1.swap( r2 );
}
// equality
friend constexpr bool operator==( result const & r1, result const & r2 )
noexcept( noexcept( r1.v_ == r2.v_ ) )
{
return r1.v_ == r2.v_;
}
friend constexpr bool operator!=( result const & r1, result const & r2 )
noexcept( noexcept( !( r1 == r2 ) ) )
{
return !( r1 == r2 );
}
};
template<class Ch, class Tr, class T, class E> std::basic_ostream<Ch, Tr>& operator<<( std::basic_ostream<Ch, Tr>& os, result<T, E> const & r )
{
if( r.has_value() )
{
os << "value:" << *r;
}
else
{
os << "error:" << r.error();
}
return os;
}
// result<void>
template<class E> class result<void, E>
{
private:
variant2::variant<variant2::monostate, E> v_;
public:
// constructors
// default
constexpr result() noexcept
: v_( in_place_value )
{
}
// explicit, error
template<class A, class En = typename std::enable_if<
std::is_constructible<E, A>::value &&
!std::is_convertible<A, E>::value
>::type>
explicit constexpr result( A&& a )
noexcept( std::is_nothrow_constructible<E, A>::value )
: v_( in_place_error, std::forward<A>(a) )
{
}
// implicit, error
template<class A, class En2 = void, class En = typename std::enable_if<
std::is_convertible<A, E>::value
>::type>
constexpr result( A&& a )
noexcept( std::is_nothrow_constructible<E, A>::value )
: v_( in_place_error, std::forward<A>(a) )
{
}
// more than one arg, error
template<class... A, class En2 = void, class En3 = void, class En = typename std::enable_if<
std::is_constructible<E, A...>::value &&
sizeof...(A) >= 2
>::type>
constexpr result( A&&... a )
noexcept( std::is_nothrow_constructible<E, A...>::value )
: v_( in_place_error, std::forward<A>(a)... )
{
}
// tagged, value
constexpr result( in_place_value_t ) noexcept
: v_( in_place_value )
{
}
// tagged, error
template<class... A, class En = typename std::enable_if<
std::is_constructible<E, A...>::value
>::type>
constexpr result( in_place_error_t, A&&... a )
noexcept( std::is_nothrow_constructible<E, A...>::value )
: v_( in_place_error, std::forward<A>(a)... )
{
}
// queries
constexpr bool has_value() const noexcept
{
return v_.index() == 0;
}
constexpr bool has_error() const noexcept
{
return v_.index() != 0;
}
constexpr explicit operator bool() const noexcept
{
return v_.index() == 0;
}
// checked value access
BOOST_CXX14_CONSTEXPR void value( boost::source_location const& loc = BOOST_CURRENT_LOCATION ) const
{
if( has_value() )
{
}
else
{
throw_exception_from_error( variant2::unsafe_get<1>( v_ ), loc );
}
}
// unchecked value access
BOOST_CXX14_CONSTEXPR void* operator->() noexcept
{
return variant2::get_if<0>( &v_ );
}
BOOST_CXX14_CONSTEXPR void const* operator->() const noexcept
{
return variant2::get_if<0>( &v_ );
}
BOOST_CXX14_CONSTEXPR void operator*() const noexcept
{
BOOST_ASSERT( has_value() );
}
// error access
constexpr E error() const
noexcept( std::is_nothrow_default_constructible<E>::value && std::is_nothrow_copy_constructible<E>::value )
{
return has_error()? variant2::unsafe_get<1>( v_ ): E();
}
// swap
BOOST_CXX14_CONSTEXPR void swap( result& r )
noexcept( noexcept( v_.swap( r.v_ ) ) )
{
v_.swap( r.v_ );
}
friend BOOST_CXX14_CONSTEXPR void swap( result & r1, result & r2 )
noexcept( noexcept( r1.swap( r2 ) ) )
{
r1.swap( r2 );
}
// equality
friend constexpr bool operator==( result const & r1, result const & r2 )
noexcept( noexcept( r1.v_ == r2.v_ ) )
{
return r1.v_ == r2.v_;
}
friend constexpr bool operator!=( result const & r1, result const & r2 )
noexcept( noexcept( !( r1 == r2 ) ) )
{
return !( r1 == r2 );
}
};
template<class Ch, class Tr, class E> std::basic_ostream<Ch, Tr>& operator<<( std::basic_ostream<Ch, Tr>& os, result<void, E> const & r )
{
if( r.has_value() )
{
os << "value:void";
}
else
{
os << "error:" << r.error();
}
return os;
}
} // namespace system
} // namespace boost
#endif // #ifndef BOOST_SYSTEM_RESULT_HPP_INCLUDED

View File

@@ -0,0 +1,14 @@
#ifndef BOOST_SYSTEM_SYSTEM_CATEGORY_HPP_INCLUDED
#define BOOST_SYSTEM_SYSTEM_CATEGORY_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/detail/system_category.hpp>
#include <boost/system/detail/system_category_impl.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#endif // #ifndef BOOST_SYSTEM_SYSTEM_CATEGORY_HPP_INCLUDED

View File

@@ -0,0 +1,55 @@
#ifndef BOOST_SYSTEM_SYSTEM_ERROR_HPP
#define BOOST_SYSTEM_SYSTEM_ERROR_HPP
// Copyright Beman Dawes 2006
// Copyright Peter Dimov 2021
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/system/detail/error_code.hpp>
#include <string>
#include <stdexcept>
#include <cassert>
namespace boost
{
namespace system
{
class BOOST_SYMBOL_VISIBLE system_error: public std::runtime_error
{
private:
error_code code_;
public:
explicit system_error( error_code const & ec ):
std::runtime_error( ec.what() ), code_( ec ) {}
system_error( error_code const & ec, std::string const & prefix ):
std::runtime_error( prefix + ": " + ec.what() ), code_( ec ) {}
system_error( error_code const & ec, char const * prefix ):
std::runtime_error( std::string( prefix ) + ": " + ec.what() ), code_( ec ) {}
system_error( int ev, error_category const & ecat ):
std::runtime_error( error_code( ev, ecat ).what() ), code_( ev, ecat ) {}
system_error( int ev, error_category const & ecat, std::string const & prefix ):
std::runtime_error( prefix + ": " + error_code( ev, ecat ).what() ), code_( ev, ecat ) {}
system_error( int ev, error_category const & ecat, char const * prefix ):
std::runtime_error( std::string( prefix ) + ": " + error_code( ev, ecat ).what() ), code_( ev, ecat ) {}
error_code code() const BOOST_NOEXCEPT
{
return code_;
}
};
} // namespace system
} // namespace boost
#endif // BOOST_SYSTEM_SYSTEM_ERROR_HPP

View File

@@ -0,0 +1,119 @@
// boost/system/windows_error.hpp ------------------------------------------//
// Copyright Beman Dawes 2007
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_SYSTEM_WINDOWS_ERROR_HPP
#define BOOST_SYSTEM_WINDOWS_ERROR_HPP
// This header is effectively empty for compiles on operating systems where
// it is not applicable.
#include <boost/system/config.hpp>
#ifdef BOOST_WINDOWS_API
#include <boost/system/error_code.hpp>
#include <boost/winapi/error_codes.hpp>
namespace boost
{
namespace system
{
// Microsoft Windows ---------------------------------------------------//
// To construct an error_code after a API error:
//
// error_code( ::GetLastError(), system_category() )
namespace windows_error
{
enum windows_error_code
{
success = 0,
// These names and values are based on Windows winerror.h
invalid_function = boost::winapi::ERROR_INVALID_FUNCTION_,
file_not_found = boost::winapi::ERROR_FILE_NOT_FOUND_,
path_not_found = boost::winapi::ERROR_PATH_NOT_FOUND_,
too_many_open_files = boost::winapi::ERROR_TOO_MANY_OPEN_FILES_,
access_denied = boost::winapi::ERROR_ACCESS_DENIED_,
invalid_handle = boost::winapi::ERROR_INVALID_HANDLE_,
arena_trashed = boost::winapi::ERROR_ARENA_TRASHED_,
not_enough_memory = boost::winapi::ERROR_NOT_ENOUGH_MEMORY_,
invalid_block = boost::winapi::ERROR_INVALID_BLOCK_,
bad_environment = boost::winapi::ERROR_BAD_ENVIRONMENT_,
bad_format = boost::winapi::ERROR_BAD_FORMAT_,
invalid_access = boost::winapi::ERROR_INVALID_ACCESS_,
outofmemory = boost::winapi::ERROR_OUTOFMEMORY_,
invalid_drive = boost::winapi::ERROR_INVALID_DRIVE_,
current_directory = boost::winapi::ERROR_CURRENT_DIRECTORY_,
not_same_device = boost::winapi::ERROR_NOT_SAME_DEVICE_,
no_more_files = boost::winapi::ERROR_NO_MORE_FILES_,
write_protect = boost::winapi::ERROR_WRITE_PROTECT_,
bad_unit = boost::winapi::ERROR_BAD_UNIT_,
not_ready = boost::winapi::ERROR_NOT_READY_,
bad_command = boost::winapi::ERROR_BAD_COMMAND_,
crc = boost::winapi::ERROR_CRC_,
bad_length = boost::winapi::ERROR_BAD_LENGTH_,
seek = boost::winapi::ERROR_SEEK_,
not_dos_disk = boost::winapi::ERROR_NOT_DOS_DISK_,
sector_not_found = boost::winapi::ERROR_SECTOR_NOT_FOUND_,
out_of_paper = boost::winapi::ERROR_OUT_OF_PAPER_,
write_fault = boost::winapi::ERROR_WRITE_FAULT_,
read_fault = boost::winapi::ERROR_READ_FAULT_,
gen_failure = boost::winapi::ERROR_GEN_FAILURE_,
sharing_violation = boost::winapi::ERROR_SHARING_VIOLATION_,
lock_violation = boost::winapi::ERROR_LOCK_VIOLATION_,
wrong_disk = boost::winapi::ERROR_WRONG_DISK_,
sharing_buffer_exceeded = boost::winapi::ERROR_SHARING_BUFFER_EXCEEDED_,
handle_eof = boost::winapi::ERROR_HANDLE_EOF_,
handle_disk_full = boost::winapi::ERROR_HANDLE_DISK_FULL_,
not_supported = boost::winapi::ERROR_NOT_SUPPORTED_,
rem_not_list = boost::winapi::ERROR_REM_NOT_LIST_,
dup_name = boost::winapi::ERROR_DUP_NAME_,
bad_net_path = boost::winapi::ERROR_BAD_NETPATH_,
network_busy = boost::winapi::ERROR_NETWORK_BUSY_,
// ...
file_exists = boost::winapi::ERROR_FILE_EXISTS_,
cannot_make = boost::winapi::ERROR_CANNOT_MAKE_,
// ...
broken_pipe = boost::winapi::ERROR_BROKEN_PIPE_,
open_failed = boost::winapi::ERROR_OPEN_FAILED_,
buffer_overflow = boost::winapi::ERROR_BUFFER_OVERFLOW_,
disk_full = boost::winapi::ERROR_DISK_FULL_,
// ...
lock_failed = boost::winapi::ERROR_LOCK_FAILED_,
busy = boost::winapi::ERROR_BUSY_,
cancel_violation = boost::winapi::ERROR_CANCEL_VIOLATION_,
already_exists = boost::winapi::ERROR_ALREADY_EXISTS_
// ...
// TODO: add more Windows errors
};
} // namespace windows
# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
namespace windows = windows_error;
# endif
template<> struct is_error_code_enum<windows_error::windows_error_code>
{ static const bool value = true; };
namespace windows_error
{
inline error_code make_error_code( windows_error_code e )
{ return error_code( e, system_category() ); }
}
} // namespace system
} // namespace boost
#endif // BOOST_WINDOWS_API
#endif // BOOST_SYSTEM_WINDOWS_ERROR_HPP

View File

@@ -0,0 +1,15 @@
<html>
<head>
<meta http-equiv="refresh" content="0; URL=doc/html/system.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="doc/html/system.html">doc/html/system.html</a>.
</body>
</html>
<!--
© Copyright Beman Dawes, 2001
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE_1_0.txt or copy at
https://www.boost.org/LICENSE_1_0.txt
-->

View File

@@ -0,0 +1,17 @@
{
"key": "system",
"name": "System",
"authors": [
"Beman Dawes"
],
"maintainers": [
"Peter Dimov <pdimov -at- gmail.com>"
],
"description": "Extensible error reporting.",
"category": [
"System",
"Error-handling",
"Programming"
],
"cxxstd": "03"
}

View File

@@ -0,0 +1,31 @@
// error_code stub implementation, for compatibility only
// Copyright Beman Dawes 2002, 2006
// Copyright Peter Dimov 2018
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
//----------------------------------------------------------------------------//
// define BOOST_SYSTEM_SOURCE so that <boost/system/config.hpp> knows
// the library is being built (possibly exporting rather than importing code)
#define BOOST_SYSTEM_SOURCE
#include <boost/system/config.hpp>
namespace boost
{
namespace system
{
BOOST_SYSTEM_DECL void dummy_exported_function()
{
}
} // namespace system
} // namespace boost

View File

@@ -0,0 +1,138 @@
# Copyright 2018-2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(NOT HAVE_BOOST_TEST)
return()
endif()
macro(system_run s1)
string(MAKE_C_IDENTIFIER ${s1} n1)
boost_test(SOURCES ${s1} ${ARGN})
boost_test(SOURCES ${s1} ${ARGN} COMPILE_DEFINITIONS BOOST_NO_ANSI_APIS NAME ${n1}_no_ansi)
boost_test(SOURCES ${s1} ${ARGN} COMPILE_DEFINITIONS BOOST_SYSTEM_USE_UTF8 NAME ${n1}_utf8)
endmacro()
macro(lib name macro)
add_library(${name} EXCLUDE_FROM_ALL ${ARGN})
target_compile_definitions(${name} PRIVATE $<$<BOOL:BUILD_SHARED_LIBS>:${macro}=1>)
target_link_libraries(${name} PRIVATE Boost::system Boost::config)
endmacro()
set(BOOST_TEST_LINK_LIBRARIES Boost::system Boost::core Boost::static_assert)
boost_test(SOURCES quick.cpp)
system_run(error_code_test.cpp)
system_run(error_code_user_test.cpp)
system_run(system_error_test.cpp)
lib(boost_system_throw_test THROW_DYN_LINK throw_test.cpp)
boost_test(SOURCES dynamic_link_test.cpp LINK_LIBRARIES boost_system_throw_test)
system_run(initialization_test.cpp)
system_run(header_only_test.cpp)
boost_test(SOURCES config_test.cpp)
system_run(std_interop_test.cpp)
system_run(std_mismatch_test.cpp)
lib(boost_system_single_instance_lib1 SINGLE_INSTANCE_DYN_LINK single_instance_1.cpp)
lib(boost_system_single_instance_lib2 SINGLE_INSTANCE_DYN_LINK single_instance_2.cpp)
system_run(single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp)
boost_test(SOURCES single_instance_test.cpp NAME single_instance_test_lib LINK_LIBRARIES boost_system_single_instance_lib1 boost_system_single_instance_lib2)
system_run(before_main_test.cpp)
system_run(constexpr_test.cpp)
system_run(win32_hresult_test.cpp)
system_run(error_category_test.cpp)
system_run(generic_category_test.cpp)
system_run(system_category_test.cpp)
system_run(after_main_test.cpp)
system_run(failed_test.cpp)
system_run(failed_constexpr_test.cpp)
boost_test(SOURCES warnings_test.cpp COMPILE_OPTIONS -Wall -Werror)
lib(boost_system_std_single_instance_lib1 STD_SINGLE_INSTANCE_DYN_LINK std_single_instance_1.cpp)
lib(boost_system_std_single_instance_lib2 STD_SINGLE_INSTANCE_DYN_LINK std_single_instance_2.cpp)
system_run(std_single_instance_test.cpp std_single_instance_1.cpp std_single_instance_2.cpp)
boost_test(SOURCES std_single_instance_test.cpp NAME std_single_instance_test_lib LINK_LIBRARIES boost_system_std_single_instance_lib1 boost_system_std_single_instance_lib2)
boost_test(TYPE run SOURCES is_error_code_enum_test.cpp)
boost_test(TYPE run SOURCES is_error_condition_enum_test.cpp)
boost_test(TYPE run SOURCES errc_test.cpp)
boost_test(TYPE run SOURCES errc_test2.cpp)
boost_test(TYPE run SOURCES error_category_test2.cpp)
boost_test(TYPE run SOURCES error_condition_test.cpp)
boost_test(TYPE run SOURCES error_condition_test2.cpp)
boost_test(TYPE run SOURCES generic_category_test2.cpp)
boost_test(TYPE run SOURCES generic_category_test3.cpp)
boost_test(TYPE run SOURCES system_category_test2.cpp)
boost_test(TYPE run SOURCES system_category_test3.cpp)
boost_test(TYPE run SOURCES windows_error_test.cpp)
boost_test(TYPE run SOURCES cygwin_error_test.cpp)
boost_test(TYPE run SOURCES linux_error_test.cpp)
boost_test(TYPE link SOURCES errc_test3.cpp)
boost_test(TYPE run SOURCES snprintf_test.cpp)
boost_test(TYPE run SOURCES std_interop_test2.cpp)
boost_test(TYPE run SOURCES std_interop_test3.cpp)
boost_test(TYPE run SOURCES std_interop_test4.cpp)
boost_test(TYPE run SOURCES std_interop_test5.cpp)
boost_test(TYPE run SOURCES std_interop_test6.cpp)
boost_test(TYPE run SOURCES std_interop_test7.cpp)
boost_test(TYPE run SOURCES std_interop_test8.cpp)
boost_test(TYPE run SOURCES std_interop_test9.cpp)
boost_test(TYPE run SOURCES ec_location_test.cpp)
boost_test(TYPE run SOURCES error_condition_test3.cpp)
boost_test(TYPE run SOURCES error_code_test2.cpp)
boost_test(TYPE run SOURCES system_error_test2.cpp)
boost_test(TYPE run SOURCES std_interop_test10.cpp)
boost_test(TYPE run SOURCES ec_location_test2.cpp)
boost_test(TYPE run SOURCES ec_what_test.cpp)
boost_test(TYPE run SOURCES system_error_test3.cpp)
boost_test(TYPE run SOURCES std_interop_test11.cpp)
boost_test(TYPE run SOURCES ec_wstream_test.cpp)
boost_test(TYPE run SOURCES std_interop_test12.cpp)
boost_test(TYPE run SOURCES errc_test4.cpp)
# result
set(BOOST_TEST_COMPILE_FEATURES cxx_std_11)
boost_test(TYPE run SOURCES result_default_construct.cpp)
boost_test(TYPE run SOURCES result_value_construct.cpp)
boost_test(TYPE run SOURCES result_error_construct.cpp)
boost_test(TYPE run SOURCES result_copy_construct.cpp)
boost_test(TYPE run SOURCES result_move_construct.cpp)
boost_test(TYPE run SOURCES result_copy_assign.cpp)
boost_test(TYPE run SOURCES result_move_assign.cpp)
boost_test(TYPE run SOURCES result_value_access.cpp)
boost_test(TYPE run SOURCES result_error_access.cpp)
boost_test(TYPE run SOURCES result_swap.cpp)
boost_test(TYPE run SOURCES result_eq.cpp)
boost_test(TYPE run SOURCES result_range_for.cpp)
boost_test(TYPE run SOURCES result_value_construct2.cpp)
boost_test(TYPE run SOURCES result_error_construct2.cpp)

View File

@@ -0,0 +1,165 @@
# Boost System Library test Jamfile
# Copyright Beman Dawes 2003, 2006
# Copyright 2017-2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
# See library home page at http://www.boost.org/libs/system
import testing ;
project
: default-build
<warnings>extra
: requirements
<toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings-as-errors>on
<toolset>clang:<warnings-as-errors>on
<toolset>gcc-4.4:<cxxflags>-Wno-sign-compare
;
rule system-run ( sources + )
{
local result ;
result += [ run $(sources) ] ;
result += [ run $(sources) : : : <library>/boost/system//boost_system <link>static : $(sources[1]:B)_static ] ;
result += [ run $(sources) : : : <library>/boost/system//boost_system <link>shared : $(sources[1]:B)_shared ] ;
result += [ run $(sources) : : : <define>BOOST_NO_ANSI_APIS : $(sources[1]:B)_no_ansi ] ;
result += [ run $(sources) : : : <define>BOOST_SYSTEM_USE_UTF8 : $(sources[1]:B)_utf8 ] ;
return $(result) ;
}
system-run error_code_test.cpp ;
system-run error_code_user_test.cpp ;
system-run system_error_test.cpp ;
lib throw_test : throw_test.cpp : <link>shared:<define>THROW_DYN_LINK=1 ;
run dynamic_link_test.cpp throw_test : : : <link>shared : throw_test_shared ;
system-run initialization_test.cpp ;
system-run header_only_test.cpp ;
run config_test.cpp : : : <test-info>always_show_run_output ;
system-run std_interop_test.cpp ;
system-run std_mismatch_test.cpp ;
lib single_instance_lib1 : single_instance_1.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
lib single_instance_lib2 : single_instance_2.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ;
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>static : single_instance_lib_static ;
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>shared : single_instance_lib_shared ;
system-run before_main_test.cpp ;
run-fail throws_assign_fail.cpp ;
system-run constexpr_test.cpp ;
system-run win32_hresult_test.cpp ;
system-run error_category_test.cpp ;
system-run generic_category_test.cpp ;
system-run system_category_test.cpp ;
system-run after_main_test.cpp ;
system-run failed_test.cpp ;
system-run failed_constexpr_test.cpp ;
# Quick (CI) test
run quick.cpp ;
run warnings_test.cpp
: : : <warnings>pedantic
<toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings-as-errors>on
<toolset>clang:<warnings-as-errors>on ;
lib std_single_instance_lib1 : std_single_instance_1.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
lib std_single_instance_lib2 : std_single_instance_2.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
system-run std_single_instance_test.cpp std_single_instance_1.cpp std_single_instance_2.cpp ;
run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : <link>static : std_single_instance_lib_static ;
run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : <link>shared <define>STD_SINGLE_INSTANCE_SHARED : std_single_instance_lib_shared ;
run is_error_code_enum_test.cpp ;
run is_error_condition_enum_test.cpp ;
run errc_test.cpp ;
run errc_test2.cpp ;
run error_category_test2.cpp ;
run error_condition_test.cpp ;
run error_condition_test2.cpp ;
run generic_category_test2.cpp ;
run generic_category_test3.cpp ;
run system_category_test2.cpp ;
run system_category_test3.cpp ;
run windows_error_test.cpp ;
run cygwin_error_test.cpp ;
run linux_error_test.cpp ;
link errc_test3.cpp ;
run snprintf_test.cpp ;
run std_interop_test2.cpp ;
run std_interop_test3.cpp ;
run std_interop_test4.cpp ;
run std_interop_test5.cpp
: : :
# crash on xenial, but the real g++ 4.8 on both centos 7 and trusty works
<toolset>gcc-4.8:<build>no
<toolset>gcc-4.9:<build>no
;
run std_interop_test6.cpp ;
run std_interop_test7.cpp ;
run std_interop_test8.cpp ;
run std_interop_test9.cpp ;
run ec_location_test.cpp ;
run error_condition_test3.cpp ;
run error_code_test2.cpp ;
run system_error_test2.cpp ;
run std_interop_test10.cpp ;
run ec_location_test2.cpp ;
run ec_what_test.cpp ;
run system_error_test3.cpp ;
run std_interop_test11.cpp ;
run ec_wstream_test.cpp ;
run std_interop_test12.cpp ;
run errc_test4.cpp ;
# result
import ../../config/checks/config : requires ;
CPP11 = [ requires cxx11_variadic_templates cxx11_template_aliases cxx11_decltype cxx11_constexpr cxx11_noexcept ] <toolset>gcc-4.7:<build>no ;
run result_default_construct.cpp : : : $(CPP11) ;
run result_value_construct.cpp : : : $(CPP11) ;
run result_error_construct.cpp : : : $(CPP11) ;
run result_copy_construct.cpp : : : $(CPP11) ;
run result_move_construct.cpp : : : $(CPP11) ;
run result_copy_assign.cpp : : : $(CPP11) ;
run result_move_assign.cpp : : : $(CPP11) ;
run result_value_access.cpp : : : $(CPP11) ;
run result_error_access.cpp : : : $(CPP11) ;
run result_swap.cpp : : : $(CPP11) <toolset>gcc-10:<cxxflags>"-Wno-maybe-uninitialized" ;
run result_eq.cpp : : : $(CPP11) ;
run result_range_for.cpp : : : $(CPP11) ;
run result_value_construct2.cpp : : : $(CPP11) ;
run result_error_construct2.cpp : : : $(CPP11) ;
run result_errc_construct.cpp : : : $(CPP11) ;

View File

@@ -0,0 +1,37 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/core/quick_exit.hpp>
#include <boost/config.hpp>
#include <cerrno>
#if defined(BOOST_MSVC)
# pragma warning(disable: 4722) // Z::~Z never returns
#endif
using namespace boost::system;
struct Z
{
~Z()
{
BOOST_TEST_CSTR_EQ( generic_category().name(), "generic" );
BOOST_TEST_CSTR_EQ( system_category().name(), "system" );
boost::quick_exit( boost::report_errors() );
}
};
static Z z;
static error_code e1( 1, system_category() );
static error_code e2( ENOENT, generic_category() );
int main()
{
(void)e1;
(void)e2;
}

View File

@@ -0,0 +1,30 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cerrno>
using namespace boost::system;
static error_code e1( 1, system_category() );
static std::string m1 = e1.message();
static error_code e2( ENOENT, generic_category() );
static std::string m2 = e2.message();
int main()
{
error_code e1_( 1, system_category() );
BOOST_TEST_EQ( e1, e1_ );
BOOST_TEST_EQ( m1, e1_.message() );
error_code e2_( ENOENT, generic_category() );
BOOST_TEST_EQ( e2, e2_ );
BOOST_TEST_EQ( m2, e2_.message() );
return boost::report_errors();
}

View File

@@ -0,0 +1,17 @@
# Copyright 2018, 2019 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(cmake_install_test LANGUAGES CXX)
find_package(boost_system REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main Boost::system)
enable_testing()
add_test(main main)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

View File

@@ -0,0 +1,44 @@
// Copyright 2017, 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
#include <boost/system.hpp>
#include <cassert>
#include <cerrno>
#define BOOST_TEST(expr) assert(expr)
#define BOOST_TEST_EQ(x1, x2) assert((x1)==(x2))
int main()
{
boost::system::error_category const & bt = boost::system::generic_category();
int ev = ENOENT;
boost::system::error_code bc( ev, bt );
BOOST_TEST_EQ( bc.value(), ev );
BOOST_TEST_EQ( &bc.category(), &bt );
boost::system::error_condition bn = bt.default_error_condition( ev );
BOOST_TEST_EQ( bn.value(), ev );
BOOST_TEST_EQ( &bn.category(), &bt );
BOOST_TEST( bt.equivalent( ev, bn ) );
BOOST_TEST( bc == bn );
boost::system::error_code bc2 = make_error_code( boost::system::errc::no_such_file_or_directory );
BOOST_TEST_EQ( bc2, bc );
BOOST_TEST_EQ( bc2.value(), ev );
BOOST_TEST_EQ( &bc.category(), &bt );
boost::system::system_error x( bc, "prefix" );
BOOST_TEST_EQ( x.code(), bc );
BOOST_TEST_EQ( std::string( x.what() ), "prefix: " + bc.what() );
}

View File

@@ -0,0 +1,26 @@
# Copyright 2018-2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.20)
project(cmake_subdir_test LANGUAGES CXX)
add_subdirectory(../.. boostorg/system)
add_subdirectory(../../../assert boostorg/assert)
add_subdirectory(../../../config boostorg/config)
add_subdirectory(../../../core boostorg/core)
add_subdirectory(../../../mp11 boostorg/mp11)
add_subdirectory(../../../predef boostorg/predef)
add_subdirectory(../../../static_assert boostorg/static_assert)
add_subdirectory(../../../throw_exception boostorg/throw_exception)
add_subdirectory(../../../variant2 boostorg/variant2)
add_subdirectory(../../../winapi boostorg/winapi)
add_executable(quick ../quick.cpp)
target_link_libraries(quick Boost::system Boost::core)
enable_testing()
add_test(quick quick)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)

View File

@@ -0,0 +1,65 @@
// error_code_test.cpp ---------------------------------------------------------------//
// Copyright Beman Dawes 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
#include <boost/system/config.hpp>
#include <iostream>
using std::cout;
using std::endl;
int main()
{
#ifdef BOOST_WINDOWS_API
std::cout << "BOOST_WINDOWS_API is defined" << std::endl;
#else
std::cout << "BOOST_WINDOWS_API is not defined" << std::endl;
#endif
#ifdef _MSC_VER
std::cout << "_MSC_VER is defined as " << _MSC_VER << std::endl;
#else
std::cout << "_MSC_VER is not defined" << std::endl;
#endif
#ifdef __CYGWIN__
std::cout << "__CYGWIN__ is defined" << std::endl;
#else
std::cout << "__CYGWIN__ is not defined" << std::endl;
#endif
#ifdef __MINGW32__
std::cout << "__MINGW32__ is defined" << std::endl;
#else
std::cout << "__MINGW32__ is not defined" << std::endl;
#endif
#ifdef BOOST_POSIX_API
std::cout << "BOOST_POSIX_API is defined" << std::endl;
#else
std::cout << "BOOST_POSIX_API is not defined" << std::endl;
#endif
#ifdef BOOST_PLAT_WINDOWS_DESKTOP
std::cout << "BOOST_PLAT_WINDOWS_DESKTOP is defined as "
<< BOOST_PLAT_WINDOWS_DESKTOP << std::endl;
#else
std::cout << "BOOST_PLAT_WINDOWS_DESKTOP is not defined" << std::endl;
#endif
#ifdef BOOST_NO_ANSI_APIS
std::cout << "BOOST_NO_ANSI_APIS is defined" << std::endl;
#else
std::cout << "BOOST_NO_ANSI_APIS is not defined" << std::endl;
#endif
#ifdef BOOST_NO_CXX11_NOEXCEPT
std::cout << "BOOST_NO_CXX11_NOEXCEPT is defined" << std::endl;
#else
std::cout << "BOOST_NO_CXX11_NOEXCEPT is not defined" << std::endl;
#endif
#ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
std::cout << "BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS is defined" << std::endl;
#else
std::cout << "BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS is not defined" << std::endl;
#endif
return 0;
}

View File

@@ -0,0 +1,68 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config/pragma_message.hpp>
#include <boost/static_assert.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#if !defined(BOOST_SYSTEM_HAS_CONSTEXPR)
BOOST_PRAGMA_MESSAGE("Skipping constexpr test, BOOST_SYSTEM_HAS_CONSTEXPR isn't defined")
int main() {}
#else
using namespace boost::system;
constexpr error_code e1( 1, system_category() );
BOOST_STATIC_ASSERT( e1.value() == 1 );
BOOST_STATIC_ASSERT( e1.category() == system_category() );
BOOST_STATIC_ASSERT( e1 );
BOOST_STATIC_ASSERT( e1 == e1 );
constexpr error_code e2( 2, generic_category() );
BOOST_STATIC_ASSERT( e2.value() == 2 );
BOOST_STATIC_ASSERT( e2.category() == generic_category() );
BOOST_STATIC_ASSERT( e2 );
BOOST_STATIC_ASSERT( e2 == e2 );
#if !BOOST_WORKAROUND(BOOST_GCC, < 80200)
BOOST_STATIC_ASSERT( e1 != e2 );
#endif
constexpr error_code e3;
BOOST_STATIC_ASSERT( e3.value() == 0 );
BOOST_STATIC_ASSERT( e3.category() == system_category() );
BOOST_STATIC_ASSERT( !e3 );
BOOST_STATIC_ASSERT( e3 == e3 );
#if !BOOST_WORKAROUND(BOOST_GCC, < 80200)
BOOST_STATIC_ASSERT( e1 != e3 );
#endif
int main()
{
error_code e1_( 1, system_category() );
BOOST_TEST_EQ( e1, e1_ );
error_code e2_( 2, generic_category() );
BOOST_TEST_EQ( e2, e2_ );
error_code e3_;
BOOST_TEST_EQ( e3, e3_ );
return boost::report_errors();
}
#endif

View File

@@ -0,0 +1,29 @@
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system/cygwin_error.hpp>
#include <boost/config/pragma_message.hpp>
#if !defined(__CYGWIN__)
BOOST_PRAGMA_MESSAGE( "Skipping test, __CYGWIN__ is not defined" )
int main() {}
#else
#include <boost/core/lightweight_test.hpp>
int main()
{
namespace sys = boost::system;
sys::error_code ec = sys::cygwin_error::no_package;
BOOST_TEST_EQ( ec, sys::cygwin_error::no_package );
BOOST_TEST_EQ( ec, sys::error_code( ENOPKG, sys::system_category() ) );
return boost::report_errors();
}
#endif

View File

@@ -0,0 +1,47 @@
// dynamic_link_test.cpp -------------------------------------------------------------//
// Copyright Beman Dawes 2010
// Distributed under the Boost Software License, Version 1.0.
// See www.boost.org/LICENSE_1_0.txt
// Library home page is www.boost.org/libs/system
//--------------------------------------------------------------------------------------//
// Dynamic link libraries (DLL's), also know as dynamic shared objects (DSO's),
// can cause symbol visability problems unless carefully configured. One of the
// manifestations, particularly with GCC, is that a system_error exception thrown from
// a DLL or DSO is not caught.
//
// The purpose of this program is to test for that error.
//--------------------------------------------------------------------------------------//
#include <boost/system/system_error.hpp>
#include <iostream>
void throw_test();
int main()
{
try
{
throw_test();
}
catch (const boost::system::system_error& ex)
{
std::cout << " caught boost::system::system_error as expected\n";
std::cout << " what() reports " << ex.what() << '\n';
return 0;
}
catch (const std::runtime_error& ex)
{
std::cout << " error: caught std::runtime_error instead of boost::system::system_error\n";
std::cout << " what() reports " << ex.what() << '\n';
return 1;
}
std::cout << " error: failed to catch boost::system::system_error\n";
return 1;
}

View File

@@ -0,0 +1,116 @@
// Copyright 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cerrno>
int main()
{
int const val = ENOENT;
boost::system::error_category const & cat = boost::system::generic_category();
{
boost::system::error_code ec( val, cat );
BOOST_TEST_EQ( ec.value(), val );
BOOST_TEST_EQ( &ec.category(), &cat );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
boost::system::error_code ec( val, cat, &loc );
BOOST_TEST_EQ( ec.value(), val );
BOOST_TEST_EQ( &ec.category(), &cat );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 27 );
}
{
boost::system::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &boost::system::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec = boost::system::error_code( val, cat, &loc );
BOOST_TEST_EQ( ec.value(), val );
BOOST_TEST_EQ( &ec.category(), &cat );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 51 );
}
{
boost::system::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &boost::system::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec.assign( val, cat, &loc );
BOOST_TEST_EQ( ec.value(), val );
BOOST_TEST_EQ( &ec.category(), &cat );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 75 );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
{
std::error_code e2( val, std::generic_category() );
boost::system::error_code ec( e2 );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec.assign( val, cat, &loc );
BOOST_TEST_EQ( ec.value(), val );
BOOST_TEST_EQ( &ec.category(), &cat );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 100 );
}
#endif
return boost::report_errors();
}

View File

@@ -0,0 +1,287 @@
// Copyright 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cerrno>
namespace sys = boost::system;
enum E
{
none = 0,
einval = EINVAL
};
namespace boost
{
namespace system
{
template<> struct is_error_code_enum< ::E >
{
static const bool value = true;
};
} // namespace system
} // namespace boost
sys::error_code make_error_code( E e )
{
return e == 0? sys::error_code(): sys::error_code( e, sys::generic_category() );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
enum E2
{
e2inval = EINVAL
};
namespace boost
{
namespace system
{
template<> struct is_error_code_enum< ::E2 >
{
static const bool value = true;
};
} // namespace system
} // namespace boost
std::error_code make_error_code( E2 e )
{
return std::error_code( e, std::generic_category() );
}
#endif
int main()
{
{
sys::error_code ec( einval );
BOOST_TEST_EQ( ec.value(), EINVAL );
BOOST_TEST_EQ( &ec.category(), &sys::generic_category() );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
sys::error_code ec( einval, &loc );
BOOST_TEST_EQ( ec.value(), EINVAL );
BOOST_TEST_EQ( &ec.category(), &sys::generic_category() );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 77 );
}
{
sys::error_code ec( none );
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
sys::error_code ec( none, &loc );
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec = sys::error_code( einval, &loc );
BOOST_TEST_EQ( ec.value(), EINVAL );
BOOST_TEST_EQ( &ec.category(), &sys::generic_category() );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 127 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec = sys::error_code( none, &loc );
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec.assign( einval, &loc );
BOOST_TEST_EQ( ec.value(), EINVAL );
BOOST_TEST_EQ( &ec.category(), &sys::generic_category() );
BOOST_TEST( ec.failed() );
BOOST_TEST( ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 175 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec.assign( none, &loc );
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
{
sys::error_code ec( e2inval );
BOOST_TEST_EQ( ec, std::error_code( EINVAL, std::generic_category() ) );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
sys::error_code ec( e2inval, &loc );
BOOST_TEST_EQ( ec, std::error_code( EINVAL, std::generic_category() ) );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec = sys::error_code( e2inval, &loc );
BOOST_TEST_EQ( ec, std::error_code( EINVAL, std::generic_category() ) );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST_EQ( &ec.category(), &sys::system_category() );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
ec.assign( e2inval, &loc );
BOOST_TEST_EQ( ec, std::error_code( EINVAL, std::generic_category() ) );
BOOST_TEST( ec.failed() );
BOOST_TEST( !ec.has_location() );
BOOST_TEST_EQ( ec.location().line(), 0 );
}
#endif
return boost::report_errors();
}

View File

@@ -0,0 +1,91 @@
// Copyright 2020, 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/error_code.hpp>
#include <boost/system/generic_category.hpp>
#include <boost/system/system_category.hpp>
#include <boost/core/lightweight_test.hpp>
namespace sys = boost::system;
int main()
{
{
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST( ec.category() == sys::system_category() );
BOOST_TEST_EQ( ec.what(), ec.message() + " [system:0]" );
}
{
sys::error_code ec( 5, sys::generic_category() );
BOOST_TEST_EQ( ec.value(), 5 );
BOOST_TEST( ec.category() == sys::generic_category() );
BOOST_TEST_EQ( ec.what(), ec.message() + " [generic:5]" );
}
{
sys::error_code ec( 5, sys::system_category() );
BOOST_TEST_EQ( ec.value(), 5 );
BOOST_TEST( ec.category() == sys::system_category() );
BOOST_TEST_EQ( ec.what(), ec.message() + " [system:5]" );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
sys::error_code ec( 5, sys::generic_category(), &loc );
BOOST_TEST_EQ( ec.value(), 5 );
BOOST_TEST( ec.category() == sys::generic_category() );
BOOST_TEST_EQ( &ec.location(), &loc );
BOOST_TEST_EQ( ec.what(), ec.message() + " [generic:5 at " + loc.to_string() + "]" );
}
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
sys::error_code ec( 5, sys::system_category(), &loc );
BOOST_TEST_EQ( ec.value(), 5 );
BOOST_TEST( ec.category() == sys::system_category() );
BOOST_TEST_EQ( &ec.location(), &loc );
BOOST_TEST_EQ( ec.what(), ec.message() + " [system:5 at " + loc.to_string() + "]" );
}
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
{
std::error_code ec;
sys::error_code ec2( ec );
BOOST_TEST_EQ( ec2.what(), ec2.message() + " [std:system:0]" );
}
{
std::error_code ec( 5, std::generic_category() );
sys::error_code ec2( ec );
BOOST_TEST_EQ( ec2.what(), ec2.message() + " [std:generic:5]" );
}
{
std::error_code ec( 5, std::system_category() );
sys::error_code ec2( ec );
BOOST_TEST_EQ( ec2.what(), ec2.message() + " [std:system:5]" );
}
#endif
return boost::report_errors();
}

View File

@@ -0,0 +1,21 @@
// Copyright 2022 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <sstream>
namespace sys = boost::system;
int main()
{
{
std::wostringstream os;
os << sys::error_code();
BOOST_TEST( os.str() == L"system:0" );
}
return boost::report_errors();
}

View File

@@ -0,0 +1,18 @@
// Copyright 2020 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/system/is_error_condition_enum.hpp>
#include <boost/core/lightweight_test.hpp>
int main()
{
BOOST_TEST_EQ( static_cast<int>( boost::system::errc::success ), 0 );
BOOST_TEST_EQ( static_cast<int>( boost::system::errc::no_such_file_or_directory ), ENOENT );
BOOST_TEST_EQ( static_cast<int>( boost::system::errc::address_family_not_supported ), EAFNOSUPPORT );
BOOST_TEST( boost::system::is_error_condition_enum< boost::system::errc::errc_t >::value );
return boost::report_errors();
}

View File

@@ -0,0 +1,20 @@
// Copyright 2020 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/core/lightweight_test.hpp>
int main()
{
BOOST_TEST_EQ( make_error_code( boost::system::errc::success ).value(), 0 );
BOOST_TEST_EQ( make_error_condition( boost::system::errc::success ).value(), 0 );
BOOST_TEST_EQ( make_error_code( boost::system::errc::no_such_file_or_directory ).value(), ENOENT );
BOOST_TEST_EQ( make_error_condition( boost::system::errc::no_such_file_or_directory ).value(), ENOENT );
BOOST_TEST_EQ( make_error_code( boost::system::errc::address_family_not_supported ).value(), EAFNOSUPPORT );
BOOST_TEST_EQ( make_error_condition( boost::system::errc::address_family_not_supported ).value(), EAFNOSUPPORT );
return boost::report_errors();
}

View File

@@ -0,0 +1,34 @@
// Copyright 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
int main()
{
make_error_code( boost::system::errc::success ).value();
make_error_code( boost::system::errc::success ).category();
make_error_code( boost::system::errc::success ).default_error_condition();
make_error_code( boost::system::errc::success ).message();
make_error_code( boost::system::errc::success ).failed();
make_error_code( boost::system::errc::success ).clear();
make_error_condition( boost::system::errc::success ).value();
make_error_condition( boost::system::errc::success ).category();
make_error_condition( boost::system::errc::success ).message();
make_error_condition( boost::system::errc::success ).failed();
make_error_condition( boost::system::errc::success ).clear();
make_error_code( boost::system::errc::no_such_file_or_directory ).value();
make_error_code( boost::system::errc::no_such_file_or_directory ).category();
make_error_code( boost::system::errc::no_such_file_or_directory ).default_error_condition();
make_error_code( boost::system::errc::no_such_file_or_directory ).message();
make_error_code( boost::system::errc::no_such_file_or_directory ).failed();
make_error_code( boost::system::errc::no_such_file_or_directory ).clear();
make_error_condition( boost::system::errc::no_such_file_or_directory ).value();
make_error_condition( boost::system::errc::no_such_file_or_directory ).category();
make_error_condition( boost::system::errc::no_such_file_or_directory ).message();
make_error_condition( boost::system::errc::no_such_file_or_directory ).failed();
make_error_condition( boost::system::errc::no_such_file_or_directory ).clear();
}

View File

@@ -0,0 +1,17 @@
// Copyright 2022 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/assert/source_location.hpp>
#include <boost/core/lightweight_test.hpp>
int main()
{
BOOST_STATIC_CONSTEXPR boost::source_location loc = BOOST_CURRENT_LOCATION;
BOOST_TEST( make_error_code( boost::system::errc::no_such_file_or_directory, &loc ).has_location() );
BOOST_TEST_EQ( make_error_code( boost::system::errc::no_such_file_or_directory, &loc ).location().to_string(), loc.to_string() );
return boost::report_errors();
}

View File

@@ -0,0 +1,82 @@
// Copyright 2018 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
// Avoid spurious VC++ warnings
# define _CRT_SECURE_NO_WARNINGS
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cstdio>
//
namespace sys = boost::system;
class user_category: public sys::error_category
{
public:
virtual const char * name() const BOOST_NOEXCEPT
{
return "user";
}
virtual std::string message( int ev ) const
{
char buffer[ 256 ];
std::sprintf( buffer, "user message %d", ev );
return buffer;
}
using sys::error_category::message;
};
static user_category s_cat_1;
static user_category s_cat_2;
int main()
{
// default_error_condition
BOOST_TEST( s_cat_1.default_error_condition( 1 ) == sys::error_condition( 1, s_cat_1 ) );
BOOST_TEST( s_cat_2.default_error_condition( 2 ) == sys::error_condition( 2, s_cat_2 ) );
// equivalent
BOOST_TEST( s_cat_1.equivalent( 1, sys::error_condition( 1, s_cat_1 ) ) );
BOOST_TEST( !s_cat_1.equivalent( 1, sys::error_condition( 2, s_cat_1 ) ) );
BOOST_TEST( !s_cat_1.equivalent( 1, sys::error_condition( 2, s_cat_2 ) ) );
// the other equivalent
BOOST_TEST( s_cat_1.equivalent( sys::error_code( 1, s_cat_1 ), 1 ) );
BOOST_TEST( !s_cat_1.equivalent( sys::error_code( 1, s_cat_1 ), 2 ) );
BOOST_TEST( !s_cat_1.equivalent( sys::error_code( 1, s_cat_2 ), 1 ) );
// message
{
char buffer[ 256 ];
BOOST_TEST_CSTR_EQ( s_cat_1.message( 1, buffer, sizeof( buffer ) ), s_cat_1.message( 1 ).c_str() );
}
{
char buffer[ 4 ];
BOOST_TEST_CSTR_EQ( s_cat_1.message( 1, buffer, sizeof( buffer ) ), "use" );
}
// ==
BOOST_TEST_NOT( s_cat_1 == s_cat_2 );
BOOST_TEST( s_cat_1 != s_cat_2 );
return boost::report_errors();
}

View File

@@ -0,0 +1,79 @@
// Copyright 2018, 2020 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
// Avoid spurious VC++ warnings
#define _CRT_SECURE_NO_WARNINGS
#include <boost/system/error_category.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cstdio>
//
namespace sys = boost::system;
class user_category: public sys::error_category
{
public:
virtual const char * name() const BOOST_NOEXCEPT
{
return "user";
}
virtual std::string message( int ev ) const
{
char buffer[ 256 ];
std::sprintf( buffer, "user message %d", ev );
return buffer;
}
using sys::error_category::message;
};
static user_category s_cat_1;
static user_category s_cat_2;
int main()
{
// default_error_condition
BOOST_TEST( s_cat_1.default_error_condition( 1 ).value() == 1 );
BOOST_TEST( s_cat_1.default_error_condition( 1 ).category() == s_cat_1 );
BOOST_TEST( s_cat_2.default_error_condition( 2 ).value() == 2 );
BOOST_TEST( s_cat_2.default_error_condition( 2 ).category() == s_cat_2 );
// equivalent
BOOST_TEST( s_cat_1.equivalent( 1, s_cat_1.default_error_condition( 1 ) ) );
BOOST_TEST( !s_cat_1.equivalent( 1, s_cat_1.default_error_condition( 2 ) ) );
BOOST_TEST( !s_cat_1.equivalent( 1, s_cat_2.default_error_condition( 2 ) ) );
// message
{
char buffer[ 256 ];
BOOST_TEST_CSTR_EQ( s_cat_1.message( 1, buffer, sizeof( buffer ) ), s_cat_1.message( 1 ).c_str() );
}
{
char buffer[ 4 ];
BOOST_TEST_CSTR_EQ( s_cat_1.message( 1, buffer, sizeof( buffer ) ), "use" );
}
// ==
BOOST_TEST_NOT( s_cat_1 == s_cat_2 );
BOOST_TEST( s_cat_1 != s_cat_2 );
return boost::report_errors();
}

View File

@@ -0,0 +1,298 @@
// error_code_test.cpp -----------------------------------------------------//
// Copyright Beman Dawes 2006
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
//----------------------------------------------------------------------------//
#include <boost/config/warning_disable.hpp>
#include <boost/system/error_code.hpp>
#include <boost/core/lightweight_test.hpp>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <functional>
#include <boost/cerrno.hpp>
// Although using directives are not the best programming practice, testing
// with a boost::system using directive increases use scenario coverage.
using namespace boost::system;
#if defined( BOOST_WINDOWS_API )
// Neither MinGW or Cygwin versions of winerror.h work if used alone, so on
// either of those platforms include the full windows.h
# if defined(__MINGW32__) || defined(__CYGWIN__)
# include <windows.h>
# else
# include <winerror.h>
# endif
# define BOOST_ACCESS_ERROR_MACRO ERROR_ACCESS_DENIED
#elif defined( BOOST_POSIX_API )
# define BOOST_ACCESS_ERROR_MACRO EACCES
#else
# error "Only supported for POSIX and Windows"
#endif
namespace
{
void check_ostream( error_code ec, const char * expected )
{
std::stringstream ss;
std::string s;
ss << ec;
ss >> s;
BOOST_TEST( s == expected );
}
// throws_function_test ------------------------------------------------------------//
// usage example
int divide(int dividend, int divisor, boost::system::error_code& ec = boost::throws())
{
if (divisor == 0) // is there an error?
{
if (&ec == &boost::throws()) // throw on error
throw "oops!"; // whatever exception you prefer
ec = error_code(EDOM, generic_category()); // report error via error_code
return 0;
}
if (&ec != &boost::throws()) // error reporting via error_code
ec.clear();
return dividend / divisor;
}
// test usage example
void test_throws_usage()
{
std::cout << "Test throws() example and usage...\n";
error_code ec;
// no error tests
BOOST_TEST_EQ((divide(10, 2)), 5); // no error, report via exception
ec = make_error_code(errc::argument_out_of_domain);
BOOST_TEST_EQ((divide(10, 5, ec)), 2); // no error, report via error_code
BOOST_TEST(!ec);
ec = make_error_code(errc::argument_out_of_domain);
BOOST_TEST_EQ((divide(10, 0, ec)), 0); // error, report via error_code
BOOST_TEST(ec);
bool exception_thrown = false;
try
{ divide(10, 0); } // error, report via exception
catch (...)
{ exception_thrown = true; }
BOOST_TEST(exception_thrown);
//error_code should_fail(boost::throws()); // should fail at runtime
//boost::throws() = ec; // should fail at runtime
}
}
// main ------------------------------------------------------------------------------//
// TODO: add hash_value tests
int main( int, char ** )
{
std::cout << "Conversion use cases...\n";
error_condition x1( errc::file_exists );
(void)x1;
//error_code x2( errc::file_exists ); // should fail to compile
make_error_code(errc::file_exists);
make_error_condition(errc::file_exists);
std::cout << "General tests...\n";
// unit tests:
BOOST_TEST( generic_category() == generic_category() );
BOOST_TEST( system_category() == system_category() );
BOOST_TEST( generic_category() != system_category() );
BOOST_TEST( system_category() != generic_category() );
BOOST_TEST_NE( generic_category() < system_category(), system_category() < generic_category() );
error_code ec;
error_condition econd;
BOOST_TEST( !ec );
BOOST_TEST( ec.value() == 0 );
econd = ec.default_error_condition();
BOOST_TEST( econd.value() == 0 );
BOOST_TEST( econd.category() == generic_category() );
BOOST_TEST( ec == errc::success );
BOOST_TEST( ec.category() == system_category() );
BOOST_TEST( std::strcmp( ec.category().name(), "system") == 0 );
BOOST_TEST( !(ec < error_code( 0, system_category() )) );
BOOST_TEST( !(error_code( 0, system_category() ) < ec) );
BOOST_TEST( ec < error_code( 1, system_category() ) );
BOOST_TEST( !(error_code( 1, system_category() ) < ec) );
error_code ec_0_system( 0, system_category() );
BOOST_TEST( !ec_0_system );
BOOST_TEST( ec_0_system.value() == 0 );
econd = ec_0_system.default_error_condition();
BOOST_TEST( econd.value() == 0 );
BOOST_TEST( econd.category() == generic_category() );
BOOST_TEST( ec_0_system == errc::success );
BOOST_TEST( ec_0_system.category() == system_category() );
BOOST_TEST( std::strcmp( ec_0_system.category().name(), "system") == 0 );
check_ostream( ec_0_system, "system:0" );
BOOST_TEST( ec_0_system == ec );
error_code ec_1_system( 1, system_category() );
BOOST_TEST( ec_1_system );
BOOST_TEST( ec_1_system.value() == 1 );
BOOST_TEST( ec_1_system.value() != 0 );
BOOST_TEST( ec != ec_1_system );
BOOST_TEST( ec_0_system != ec_1_system );
check_ostream( ec_1_system, "system:1" );
ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category() );
BOOST_TEST( ec );
BOOST_TEST( ec.value() == BOOST_ACCESS_ERROR_MACRO );
econd = ec.default_error_condition();
BOOST_TEST( econd.value() == static_cast<int>(errc::permission_denied) );
BOOST_TEST( econd.category() == generic_category() );
BOOST_TEST( econd == error_condition( errc::permission_denied, generic_category() ) );
BOOST_TEST( econd == errc::permission_denied );
BOOST_TEST( errc::permission_denied == econd );
BOOST_TEST( ec == errc::permission_denied );
BOOST_TEST( ec.category() == system_category() );
BOOST_TEST( std::strcmp( ec.category().name(), "system") == 0 );
// test the explicit make_error_code conversion for errc
ec = make_error_code( errc::bad_message );
BOOST_TEST( ec );
BOOST_TEST( ec == errc::bad_message );
BOOST_TEST( errc::bad_message == ec );
BOOST_TEST( ec != errc::permission_denied );
BOOST_TEST( errc::permission_denied != ec );
BOOST_TEST( ec.category() == generic_category() );
//// test the deprecated predefined error_category synonyms
//BOOST_TEST( &system_category() == &native_ecat );
//BOOST_TEST( &generic_category() == &errno_ecat );
//BOOST_TEST( system_category() == native_ecat );
//BOOST_TEST( generic_category() == errno_ecat );
// test error_code and error_condition message();
// see Boost.Filesystem operations_test for code specific message() tests
ec = error_code( -1, system_category() );
std::cout << "error_code message for -1 is \"" << ec.message() << "\"\n";
std::cout << "error_code message for 0 is \"" << ec_0_system.message() << "\"\n";
#if defined(BOOST_WINDOWS_API)
// Borland appends newline, so just check text
BOOST_TEST( ec.message().substr(0,13) == "Unknown error" );
// Fails when the language isn't US English
// BOOST_TEST( ec_0_system.message().substr(0,36) == "The operation completed successfully" );
#elif defined(linux) || defined(__linux) || defined(__linux__)
// Linux appends value to message as unsigned, so it varies with # of bits
BOOST_TEST( ec.message().substr(0,13) == "Unknown error" );
#elif defined(__hpux)
BOOST_TEST( ec.message() == "" );
#elif defined(__osf__)
BOOST_TEST( ec.message() == "Error -1 occurred." );
#elif defined(__vms)
BOOST_TEST( ec.message() == "error -1" );
#endif
ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category() );
BOOST_TEST( ec.message() != "" );
BOOST_TEST( ec.message().substr( 0, 13) != "Unknown error" );
econd = error_condition( -1, generic_category() );
error_condition econd_ok;
std::cout << "error_condition message for -1 is \"" << econd.message() << "\"\n";
std::cout << "error_condition message for 0 is \"" << econd_ok.message() << "\"\n";
#if defined(BOOST_WINDOWS_API)
// Borland appends newline, so just check text
BOOST_TEST( econd.message().substr(0,13) == "Unknown error" );
BOOST_TEST( econd_ok.message().substr(0,8) == "No error" );
#elif defined(linux) || defined(__linux) || defined(__linux__)
// Linux appends value to message as unsigned, so it varies with # of bits
BOOST_TEST( econd.message().substr(0,13) == "Unknown error" );
#elif defined(__hpux)
BOOST_TEST( econd.message() == "" );
#elif defined(__osf__)
BOOST_TEST( econd.message() == "Error -1 occurred." );
#elif defined(__vms)
BOOST_TEST( econd.message() == "error -1" );
#endif
econd = error_condition( BOOST_ACCESS_ERROR_MACRO, generic_category() );
BOOST_TEST( econd.message() != "" );
BOOST_TEST( econd.message().substr( 0, 13) != "Unknown error" );
test_throws_usage();
#ifdef BOOST_WINDOWS_API
std::cout << "Windows tests...\n";
// these tests probe the Windows errc decoder
// test the first entry in the decoder table:
ec = error_code( ERROR_ACCESS_DENIED, system_category() );
BOOST_TEST( ec.value() == ERROR_ACCESS_DENIED );
BOOST_TEST( ec == errc::permission_denied );
BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
// test the second entry in the decoder table:
ec = error_code( ERROR_ALREADY_EXISTS, system_category() );
BOOST_TEST( ec.value() == ERROR_ALREADY_EXISTS );
BOOST_TEST( ec == errc::file_exists );
BOOST_TEST( ec.default_error_condition().value() == errc::file_exists );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
// test the third entry in the decoder table:
ec = error_code( ERROR_BAD_UNIT, system_category() );
BOOST_TEST( ec.value() == ERROR_BAD_UNIT );
BOOST_TEST( ec == errc::no_such_device );
BOOST_TEST( ec.default_error_condition().value() == errc::no_such_device );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
// test the last non-Winsock entry in the decoder table:
ec = error_code( ERROR_WRITE_PROTECT, system_category() );
BOOST_TEST( ec.value() == ERROR_WRITE_PROTECT );
BOOST_TEST( ec == errc::permission_denied );
BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
// test the last Winsock entry in the decoder table:
ec = error_code( WSAEWOULDBLOCK, system_category() );
BOOST_TEST( ec.value() == WSAEWOULDBLOCK );
BOOST_TEST( ec == errc::operation_would_block );
BOOST_TEST( ec.default_error_condition().value() == errc::operation_would_block );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
// test not-in-table condition:
ec = error_code( 1234567890, system_category() );
BOOST_TEST( ec.value() == 1234567890 );
BOOST_TEST( ec.default_error_condition().value() == 1234567890 );
BOOST_TEST( ec.default_error_condition().category() == system_category() );
#else // POSIX
std::cout << "POSIX tests...\n";
ec = error_code( EACCES, system_category() );
BOOST_TEST( ec == error_code( errc::permission_denied, system_category() ) );
BOOST_TEST( error_code( errc::permission_denied, system_category() ) == ec );
BOOST_TEST( ec == errc::permission_denied );
BOOST_TEST( errc::permission_denied == ec );
BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
BOOST_TEST( ec.default_error_condition().category() == generic_category() );
#endif
return ::boost::report_errors();
}

View File

@@ -0,0 +1,94 @@
// Copyright 2020, 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/error_code.hpp>
#include <boost/system/generic_category.hpp>
#include <boost/system/system_category.hpp>
#include <boost/core/lightweight_test.hpp>
namespace sys = boost::system;
int main()
{
char buffer[ 1024 ];
sys::error_code ec;
BOOST_TEST_EQ( ec.value(), 0 );
BOOST_TEST( ec.category() == sys::system_category() );
BOOST_TEST_EQ( ec.message(), ec.category().message( ec.value() ) );
BOOST_TEST_CSTR_EQ( ec.message( buffer, sizeof( buffer ) ), ec.category().message( ec.value(), buffer, sizeof( buffer ) ) );
BOOST_TEST( !ec.failed() );
BOOST_TEST( !ec );
BOOST_TEST_EQ( ec.to_string(), std::string( "system:0" ) );
{
sys::error_code ec2( ec );
BOOST_TEST_EQ( ec2.value(), 0 );
BOOST_TEST( ec2.category() == sys::system_category() );
BOOST_TEST_EQ( ec2.message(), ec2.category().message( ec2.value() ) );
BOOST_TEST_CSTR_EQ( ec2.message( buffer, sizeof( buffer ) ), ec2.category().message( ec2.value(), buffer, sizeof( buffer ) ) );
BOOST_TEST( !ec2.failed() );
BOOST_TEST( !ec2 );
BOOST_TEST_EQ( ec, ec2 );
BOOST_TEST_NOT( ec != ec2 );
BOOST_TEST_EQ( ec2.to_string(), std::string( "system:0" ) );
}
{
sys::error_code ec2( ec.value(), ec.category() );
BOOST_TEST_EQ( ec2.value(), 0 );
BOOST_TEST( ec2.category() == sys::system_category() );
BOOST_TEST_EQ( ec2.message(), ec2.category().message( ec2.value() ) );
BOOST_TEST_CSTR_EQ( ec2.message( buffer, sizeof( buffer ) ), ec2.category().message( ec2.value(), buffer, sizeof( buffer ) ) );
BOOST_TEST( !ec2.failed() );
BOOST_TEST( !ec2 );
BOOST_TEST_EQ( ec, ec2 );
BOOST_TEST_NOT( ec != ec2 );
BOOST_TEST_EQ( ec2.to_string(), std::string( "system:0" ) );
}
{
sys::error_code ec2( 5, sys::generic_category() );
BOOST_TEST_EQ( ec2.value(), 5 );
BOOST_TEST( ec2.category() == sys::generic_category() );
BOOST_TEST_EQ( ec2.message(), ec2.category().message( ec2.value() ) );
BOOST_TEST_CSTR_EQ( ec2.message( buffer, sizeof( buffer ) ), ec2.category().message( ec2.value(), buffer, sizeof( buffer ) ) );
BOOST_TEST( ec2.failed() );
BOOST_TEST( ec2 );
BOOST_TEST_NOT( !ec2 );
BOOST_TEST_NE( ec, ec2 );
BOOST_TEST_NOT( ec == ec2 );
BOOST_TEST_EQ( ec2.to_string(), std::string( "generic:5" ) );
}
{
sys::error_code ec2( 5, sys::system_category() );
BOOST_TEST_EQ( ec2.value(), 5 );
BOOST_TEST( ec2.category() == sys::system_category() );
BOOST_TEST_EQ( ec2.message(), ec2.category().message( ec2.value() ) );
BOOST_TEST_CSTR_EQ( ec2.message( buffer, sizeof( buffer ) ), ec2.category().message( ec2.value(), buffer, sizeof( buffer ) ) );
BOOST_TEST( ec2.failed() );
BOOST_TEST( ec2 );
BOOST_TEST_NOT( !ec2 );
BOOST_TEST_NE( ec, ec2 );
BOOST_TEST_NOT( ec == ec2 );
BOOST_TEST_EQ( ec2.to_string(), std::string( "system:5" ) );
}
return boost::report_errors();
}

View File

@@ -0,0 +1,402 @@
// error_code_user_test.cpp ------------------------------------------------//
// Copyright Beman Dawes 2006
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
// ------------------------------------------------------------------------ //
// This program demonstrates creation and use of new categories of error
// codes. Several scenarios are demonstrated and tested.
// Motivation was a Boost posting by Christopher Kohlhoff on June 28, 2006.
#include <boost/system/error_code.hpp>
#include <boost/cerrno.hpp>
#include <string>
#include <cstdio>
#include <boost/detail/lightweight_test.hpp>
#ifdef BOOST_POSIX_API
# include <sys/stat.h>
#else
# include <windows.h>
#endif
// ------------------------------------------------------------------------ //
// Library 1: User function passes through an error code from the
// operating system.
boost::system::error_code my_mkdir( const std::string & path )
{
return boost::system::error_code(
# ifdef BOOST_POSIX_API
::mkdir( path.c_str(), S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH ) == 0 ? 0 : errno,
# else
::CreateDirectoryA( path.c_str(), 0 ) != 0 ? 0 : ::GetLastError(),
# endif
boost::system::system_category() );
}
// ------------------------------------------------------------------------ //
// Library 2: User function passes through errno from the C-runtime.
#include <cstdio>
boost::system::error_code my_remove( const std::string & path )
{
return boost::system::error_code(
std::remove( path.c_str() ) == 0 ? 0 : errno,
boost::system::generic_category() ); // OK for both Windows and POSIX
// Alternatively, could use generic_category()
// on Windows and system_category() on
// POSIX-based systems.
}
// ------------------------------------------------------------------------ //
// Library 3: Library uses enum to identify library specific errors.
// This particular example is for a library within the parent namespace. For
// an example of a library not within the parent namespace, see library 4.
// header lib3.hpp:
namespace boost
{
namespace lib3
{
// lib3 has its own error_category:
const boost::system::error_category & get_lib3_error_category() BOOST_SYSTEM_NOEXCEPT;
const boost::system::error_category & lib3_error_category = get_lib3_error_category();
enum error
{
boo_boo=123,
big_boo_boo
};
}
namespace system
{
template<> struct is_error_code_enum<boost::lib3::error>
{ static const bool value = true; };
}
namespace lib3
{
inline boost::system::error_code make_error_code(error e)
{ return boost::system::error_code(e,lib3_error_category); }
}
}
// implementation file lib3.cpp:
// #include <lib3.hpp>
namespace boost
{
namespace lib3
{
class lib3_error_category_imp : public boost::system::error_category
{
public:
lib3_error_category_imp() : boost::system::error_category() { }
const char * name() const BOOST_SYSTEM_NOEXCEPT
{
return "lib3";
}
boost::system::error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT
{
return ev == boo_boo
? boost::system::error_condition( boost::system::errc::io_error,
boost::system::generic_category() )
: boost::system::error_condition( ev,
boost::lib3::lib3_error_category );
}
std::string message( int ev ) const
{
if ( ev == boo_boo ) return std::string("boo boo");
if ( ev == big_boo_boo ) return std::string("big boo boo");
return std::string("unknown error");
}
};
const boost::system::error_category & get_lib3_error_category() BOOST_SYSTEM_NOEXCEPT
{
static const lib3_error_category_imp l3ecat;
return l3ecat;
}
}
}
// ------------------------------------------------------------------------ //
// Library 4: Library uses const error_code's to identify library specific
// errors.
// This particular example is for a library not within the parent namespace.
// For an example of a library within the parent namespace, see library 3.
// header lib4.hpp:
namespace lib4
{
// lib4 has its own error_category:
const boost::system::error_category & get_lib4_error_category() BOOST_SYSTEM_NOEXCEPT;
const boost::system::error_category & lib4_error_category = get_lib4_error_category();
extern const boost::system::error_code boo_boo;
extern const boost::system::error_code big_boo_boo;
}
// implementation file lib4.cpp:
// #include <lib4.hpp>
namespace lib4
{
class lib4_error_category_imp : public boost::system::error_category
{
public:
lib4_error_category_imp() : boost::system::error_category() { }
const char * name() const BOOST_SYSTEM_NOEXCEPT
{
return "lib4";
}
boost::system::error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT
{
return ev == boo_boo.value()
? boost::system::error_condition( boost::system::errc::io_error,
boost::system::generic_category() )
: boost::system::error_condition( ev, lib4::lib4_error_category );
}
std::string message( int ev ) const
{
if ( ev == boo_boo.value() ) return std::string("boo boo");
if ( ev == big_boo_boo.value() ) return std::string("big boo boo");
return std::string("unknown error");
}
};
const boost::system::error_category & get_lib4_error_category() BOOST_SYSTEM_NOEXCEPT
{
static const lib4_error_category_imp l4ecat;
return l4ecat;
}
const boost::system::error_code boo_boo( 456, lib4_error_category );
const boost::system::error_code big_boo_boo( 789, lib4_error_category );
}
// ------------------------------------------------------------------------ //
// Chris Kolhoff's Test3, modified to work with error_code.hpp
// Test3
// =====
// Define error classes to check for success, permission_denied and
// out_of_memory, but add additional mappings for a user-defined error category.
//
//namespace test3 {
// enum user_err
// {
// user_success = 0,
// user_permission_denied,
// user_out_of_memory
// };
//
// class user_error_category_imp : public boost::system::error_category
// {
// public:
// const std::string & name() const
// {
// static std::string s( "test3" );
// return s;
// }
//
// boost::system::error_code portable_error_code( int ev ) const
// {
// switch (ev)
// {
// case user_success:
// return boost::system::error_code(boost::system::errc::success, boost::system::generic_category());
// case user_permission_denied:
// return boost::system::error_code(boost::system::errc::permission_denied, boost::system::generic_category());
// case user_out_of_memory:
// return boost::system::error_code(boost::system::errc::not_enough_memory, boost::system::generic_category());
// default:
// break;
// }
// return boost::system::error_code(boost::system::errc::no_posix_equivalent, boost::system::generic_category());
// }
//
// };
//
// const user_error_category_imp user_error_category_const;
//
// const boost::system::error_category & user_error_category
// = user_error_category_const;
//
// template<> inline boost::system::error_code make_error_code(user_err e)
// {
// return boost::system::error_code(e, user_error_category);
// }
//
// // test code
//
// void check_success(const boost::system::error_code& ec, bool expect)
// {
// BOOST_TEST( (ec == boost::system::errc::success) == expect );
// if (ec == boost::system::errc::success)
// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
// else
// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
// }
//
// void check_permission_denied(const boost::system::error_code& ec, bool expect)
// {
// BOOST_TEST( (ec == boost::system::errc::permission_denied) == expect );
// if (ec == boost::system::errc::permission_denied)
// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
// else
// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
// }
//
// void check_out_of_memory(const boost::system::error_code& ec, bool expect)
// {
// BOOST_TEST( (ec == boost::system::errc::not_enough_memory) == expect );
// if (ec == boost::system::errc::not_enough_memory)
// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
// else
// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
// }
//
// void run()
// {
// printf("Test3\n");
// printf("=====\n");
// boost::system::error_code ec;
// check_success(ec, true);
// check_success(boost::system::errc::success, true);
// check_success(boost::system::errc::permission_denied, false);
// check_success(boost::system::errc::not_enough_memory, false);
// check_success(user_success, true);
// check_success(user_permission_denied, false);
// check_success(user_out_of_memory, false);
// check_permission_denied(ec, false);
// check_permission_denied(boost::system::errc::success, false);
// check_permission_denied(boost::system::errc::permission_denied, true);
// check_permission_denied(boost::system::errc::not_enough_memory, false);
// check_permission_denied(user_success, false);
// check_permission_denied(user_permission_denied, true);
// check_permission_denied(user_out_of_memory, false);
// check_out_of_memory(ec, false);
// check_out_of_memory(boost::system::errc::success, false);
// check_out_of_memory(boost::system::errc::permission_denied, false);
// check_out_of_memory(boost::system::errc::not_enough_memory, true);
// check_out_of_memory(user_success, false);
// check_out_of_memory(user_permission_denied, false);
// check_out_of_memory(user_out_of_memory, true);
//
//# ifdef BOOST_WINDOWS_API
// check_success(boost::system::windows::success, true);
// check_success(boost::system::windows::access_denied, false);
// check_success(boost::system::windows::not_enough_memory, false);
// check_permission_denied(boost::system::windows::success, false);
// check_permission_denied(boost::system::windows::access_denied, true);
// check_permission_denied(boost::system::windows::not_enough_memory, false);
// check_out_of_memory(boost::system::windows::success, false);
// check_out_of_memory(boost::system::windows::access_denied, false);
// check_out_of_memory(boost::system::windows::not_enough_memory, true);
//# endif
//
// printf("\n");
// }
//
//} // namespace test3
// ------------------------------------------------------------------------ //
int main( int, char *[] )
{
boost::system::error_code ec;
// Library 1 tests:
ec = my_mkdir( "/no-such-file-or-directory/will-not-succeed" );
std::cout << "ec.value() is " << ec.value() << '\n';
BOOST_TEST( ec );
BOOST_TEST( ec == boost::system::errc::no_such_file_or_directory );
BOOST_TEST( ec.category() == boost::system::system_category() );
// Library 2 tests:
ec = my_remove( "/no-such-file-or-directory" );
std::cout << "ec.value() is " << ec.value() << '\n';
BOOST_TEST( ec );
BOOST_TEST( ec == boost::system::errc::no_such_file_or_directory );
BOOST_TEST( ec.category() == boost::system::generic_category() );
// Library 3 tests:
ec = boost::lib3::boo_boo;
std::cout << "ec.value() is " << ec.value() << '\n';
BOOST_TEST( ec );
BOOST_TEST( ec == boost::lib3::boo_boo );
BOOST_TEST( ec.value() == boost::lib3::boo_boo );
BOOST_TEST( ec.category() == boost::lib3::lib3_error_category );
BOOST_TEST( ec == boost::system::errc::io_error );
boost::system::error_code ec3( boost::lib3::boo_boo+100,
boost::lib3::lib3_error_category );
BOOST_TEST( ec3.category() == boost::lib3::lib3_error_category );
BOOST_TEST( ec3.default_error_condition().category()
== boost::lib3::lib3_error_category );
// Library 4 tests:
ec = lib4::boo_boo;
std::cout << "ec.value() is " << ec.value() << '\n';
BOOST_TEST( ec );
BOOST_TEST( ec == lib4::boo_boo );
BOOST_TEST( ec.value() == lib4::boo_boo.value() );
BOOST_TEST( ec.category() == lib4::lib4_error_category );
BOOST_TEST( ec == boost::system::errc::io_error );
boost::system::error_code ec4( lib4::boo_boo.value()+100,
lib4::lib4_error_category );
BOOST_TEST( ec4.default_error_condition().category()
== lib4::lib4_error_category );
// Test 3
//test3::run();
return ::boost::report_errors();
}

Some files were not shown because too many files have changed in this diff Show More