outcome
outcome copied to clipboard
Provides very lightweight outcome<T> and result<T> (non-Boost edition)
These popped up while intergrating with vcpkg, see commit messages. Fixes #268
When setting `OUTCOME_BUNDLE_EMBEDDED_STATUS_CODE` to `OFF`, `find_quickcpplib_library` complains that no `project()` has been called. So this has to be moved further down (not sure if `ensure_git_subrepo` can be moved too). `include/outcome/experimental/status_result.hpp`...
Repro and detailed description here: https://godbolt.org/z/YG6e8q3Y5 Excerpt: ``` using Result = outcome::result; auto foo() { Result r{1, "a"}; // r = nullptr; //< UNCOMMENT to eliminate warning r = {2,...
**Build error** ``` [ 2%] Building CXX object CMakeFiles/outcome_hl--comparison.dir/test/tests/comparison.cpp.o In file included from /home/conda/staged-recipes/build_artifacts/outcome-cpp_1657104035881/work/test/tests/../../include/outcome/config.hpp:35, from /home/conda/staged-recipes/build_artifacts/outcome-cpp_1657104035881/work/test/tests/../../include/outcome/coroutine_support.hpp:28, from /home/conda/staged-recipes/build_artifacts/outcome-cpp_1657104035881/work/test/tests/../../include/outcome.hpp:26, from /home/conda/staged-recipes/build_artifacts/outcome-cpp_1657104035881/work/test/tests/comparison.cpp:29: /home/conda/staged-recipes/build_artifacts/outcome-cpp_1657104035881/work/test/tests/../../include/outcome/basic_outcome.hpp: In instantiation of 'constexpr bool outcome_v2::operator==(const outcome_v2::basic_result&, const outcome_v2::basic_outcome&)...
Trying to build outcome on Windows with MSVC results in error C2259 *cannot instantiate abstract class*. **Build error** ``` FAILED: CMakeFiles/outcome_hl--experimental-core-result-status.dir/test/tests/experimental-core-result-status.cpp.obj C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /nologo /TP -D_CRT_NONSTDC_NO_WARNINGS -I%SRC_DIR%\include -I%SRC_DIR%\quickcpplib\_install\include /DWIN32 /D_WINDOWS /W3...
Trying to configure outcome with `cmake -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release` fails with ``` CMake Warning at _build/quickcpplib/repo/cmakelib/QuickCppLibUtils.cmake:84 (message): WARNING: .clang-tidy file found for project outcome, yet clang-tidy not on...
Compiling with BOOST_NO_EXCEPTIONS procuces the following output: ``` /home/bernard/CMakePackageCache/release/extern/Boost/1.73.0/baremetal-cortex-m0-gnu.9/Pkg/include/boost/throw_exception.hpp:180:84: error: no matching function for call to 'throw_exception(const char [24], boost::source_location)' 180 | #define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x, BOOST_CURRENT_LOCATION) | ^ /home/bernard/CMakePackageCache/release/extern/Boost/1.73.0/baremetal-cortex-m0-gnu.9/Pkg/include/boost/outcome/experimental/../config.hpp:320:45: note:...
Thanks to Mathias Gaunard for this tip. You can embed arbitrary python scripts to be run by gdb on binary load using a bit of inline assembler. See http://sourceware.org/gdb/current/onlinedocs/gdb/dotdebug_005fgdb_005fscripts-section.html A...