diff --git a/.drone/drone.bat b/.drone/drone.bat index 86171967..84d22a86 100644 --- a/.drone/drone.bat +++ b/.drone/drone.bat @@ -25,4 +25,4 @@ python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p inc echo "Testing" if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD% -..\..\b2 -j3 test toolset=%TOOLSET% %CXXSTD% %ADDRMD% embed-manifest-via=linker link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp +..\..\b2 -j3 test toolset=%TOOLSET% %CXXSTD% %ADDRMD% embed-manifest-via=linker link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_single_header,leaf_release_single_header diff --git a/.drone/drone.sh b/.drone/drone.sh index daa71742..b7c59eca 100755 --- a/.drone/drone.sh +++ b/.drone/drone.sh @@ -27,4 +27,4 @@ python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p inc echo "Testing" echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam -../../b2 -j3 test $LINKFLAGS toolset=$TOOLSET cxxstd=$CXXSTD ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS} link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp +../../b2 -j3 test $LINKFLAGS toolset=$TOOLSET cxxstd=$CXXSTD ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS} link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_single_header,leaf_release_single_header diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 969c4a4f..b084b341 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,7 +229,7 @@ jobs: - name: Run tests run: | cd ../boost-root - ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp + ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_single_header,leaf_release_single_header windows: strategy: @@ -289,4 +289,4 @@ jobs: shell: cmd run: | cd ../boost-root - b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} ${{matrix.embedmanifest}} variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp + b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} ${{matrix.embedmanifest}} variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_single_header,leaf_release_single_header diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 377ffc01..0e60784d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,39 +4,39 @@ "version": "2.0.0", "tasks": [ { - "label": "Configure Meson build directories", + "label": "Setup Meson build directories", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release && meson setup -D leaf_diagnostics=0 -D cpp_eh=none -D b_ndebug=true -D b_lto=true -D leaf_enable_benchmarks=true _bld/benchmark --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_boost_examples=false -D single_header=true _bld/debug_single_header && meson setup -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D single_header=true _bld/release_single_header --buildtype release && meson setup -D leaf_diagnostics=0 -D cpp_eh=none -D b_ndebug=true -D b_lto=true -D leaf_enable_benchmarks=true _bld/benchmark --buildtype release", "problemMatcher": [] }, { - "label": "Configure Meson build directories (no diagnostics)", + "label": "Setup Meson build directories (no diagnostics)", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D single_header=true _bld/debug_single_header && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_diagnostics=0 -D leaf_boost_examples=true -D single_header=true _bld/release_single_header --buildtype release", "problemMatcher": [] }, { - "label": "Configure Meson build directories (no capture)", + "label": "Setup Meson build directories (no capture)", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D single_header=true _bld/debug_single_header && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_capture=0 -D leaf_boost_examples=true -D single_header=true _bld/release_single_header --buildtype release", "problemMatcher": [] }, { - "label": "Configure Meson build directories (no Boost)", + "label": "Setup Meson build directories (no Boost)", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D leaf_lua_examples=true _bld/debug && meson setup -D leaf_lua_examples=true -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D leaf_lua_examples=true -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D leaf_lua_examples=true _bld/debug && meson setup -D single_header=true _bld/debug_single_header && meson setup -D leaf_lua_examples=true _bld/release --buildtype release && meson setup -D single_header=true _bld/release_single_header --buildtype release", "problemMatcher": [] }, { - "label": "Configure Meson build directories (test embedded)", + "label": "Setup Meson build directories (test embedded)", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 _bld/debug && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 _bld/release --buildtype release && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 _bld/debug && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 -D single_header=true _bld/debug_single_header && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 _bld/release --buildtype release && meson setup -D leaf_embedded=true -D leaf_diagnostics=0 -D single_header=true _bld/release_single_header --buildtype release", "problemMatcher": [] }, { - "label": "Configure Meson build directories (test embedded, no exceptions)", + "label": "Setup Meson build directories (test embedded, no exceptions)", "type": "shell", - "command": "cd ${workspaceRoot} && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 _bld/debug && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 -D leaf_hpp=true _bld/debug_leaf_hpp && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 _bld/release --buildtype release && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 -D leaf_hpp=true _bld/release_leaf_hpp --buildtype release", + "command": "cd ${workspaceRoot} && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 _bld/debug && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 -D single_header=true _bld/debug_single_header && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 _bld/release --buildtype release && meson setup -D cpp_eh=none -D leaf_embedded=true -D leaf_diagnostics=0 -D single_header=true _bld/release_single_header --buildtype release", "problemMatcher": [] }, { @@ -84,7 +84,7 @@ "dependsOn": [ "Generate leaf.hpp" ], - "command": "cd ${workspaceRoot}/_bld/release && ninja && meson test && cd ${workspaceRoot}/_bld/release_leaf_hpp && ninja && meson test", + "command": "cd ${workspaceRoot}/_bld/release && ninja && meson test && cd ${workspaceRoot}/_bld/release_single_header && ninja && meson test", "problemMatcher": { "base": "$gcc", "fileLocation": [ @@ -97,9 +97,9 @@ "group": "test", "label": "Run all unit tests (b2, all configurations)", "type": "shell", - "command": "../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=11,14,1z,17 && ../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp exception-handling=on,off cxxstd=11,14,1z,17", + "command": "../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_single_header,leaf_release_single_header,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=11,14,1z,17 && ../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_single_header,leaf_release_single_header exception-handling=on,off cxxstd=11,14,1z,17", "windows": { - "command": "..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=14,17,latest && ..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp exception-handling=on,off cxxstd=14,17,latest", + "command": "..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_single_header,leaf_release_single_header,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=14,17,latest && ..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_single_header,leaf_release_single_header exception-handling=on,off cxxstd=14,17,latest", }, "problemMatcher": { "base": "$gcc", @@ -116,7 +116,10 @@ }, "label": "Test current editor file", "type": "shell", - "command": "cd ${workspaceRoot}/_bld/debug && ninja && meson test ${fileBasenameNoExtension} || cat ./meson-logs/testlog.txt", + "command": "cd ${workspaceRoot}/_bld/debug && ninja && {meson test ${fileBasenameNoExtension} || cat ./meson-logs/testlog.txt}", + "windows": { + "command": "cd ${workspaceRoot}/_bld/debug && ninja && (meson test ${fileBasenameNoExtension} || cat ./meson-logs/testlog.txt)", + }, "problemMatcher": { "base": "$gcc", "fileLocation": [ diff --git a/benchmark/deep_stack_leaf.cpp b/benchmark/deep_stack_leaf.cpp index 768fe6c5..432577b7 100644 --- a/benchmark/deep_stack_leaf.cpp +++ b/benchmark/deep_stack_leaf.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -50,13 +49,13 @@ namespace boost } } -////////////////////////////////////// +//////////////////////////////////////// namespace leaf = boost::leaf; #define USING_RESULT_TYPE "leaf::result" -////////////////////////////////////// +//////////////////////////////////////// enum class e_error_code { @@ -136,7 +135,7 @@ inline int handle_error( e_heavy_payload const & e ) noexcept return std::accumulate(e.value.begin(), e.value.end(), 0); } -////////////////////////////////////// +//////////////////////////////////////// // This is used to change the "success" type at each level. // Generally, functions return values of different types. @@ -158,7 +157,7 @@ struct select_result_type template using select_result_t = typename select_result_type::type; -////////////////////////////////////// +//////////////////////////////////////// template struct benchmark @@ -186,7 +185,7 @@ struct benchmark<1, E> } }; -////////////////////////////////////// +//////////////////////////////////////// template NOINLINE int runner( int failure_rate ) noexcept @@ -206,7 +205,7 @@ NOINLINE int runner( int failure_rate ) noexcept } ); } -////////////////////////////////////// +//////////////////////////////////////// std::fstream append_csv() { @@ -228,7 +227,7 @@ int print_elapsed_time( int iteration_count, F && f ) { auto start = std::chrono::steady_clock::now(); int val = 0; - for( int i = 0; i!=iteration_count; ++i ) + for( int i=0; i!=iteration_count; ++i ) val += std::forward(f)(); auto stop = std::chrono::steady_clock::now(); int elapsed = std::chrono::duration_cast(stop-start).count(); @@ -237,7 +236,7 @@ int print_elapsed_time( int iteration_count, F && f ) return val; } -////////////////////////////////////// +//////////////////////////////////////// template int benchmark_type( char const * type_name, int iteration_count ) @@ -254,7 +253,7 @@ int benchmark_type( char const * type_name, int iteration_count ) return x; } -////////////////////////////////////// +//////////////////////////////////////// int main() { diff --git a/benchmark/deep_stack_other.cpp b/benchmark/deep_stack_other.cpp index 9d94a541..48782e24 100644 --- a/benchmark/deep_stack_other.cpp +++ b/benchmark/deep_stack_other.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -70,7 +69,7 @@ namespace boost } } -////////////////////////////////////// +//////////////////////////////////////// #if BENCHMARK_WHAT == 0 // tl::expected @@ -97,7 +96,7 @@ namespace boost # error Benchmark what? #endif -////////////////////////////////////// +//////////////////////////////////////// enum class e_error_code { @@ -177,7 +176,7 @@ inline int handle_error( e_heavy_payload const & e ) noexcept return std::accumulate(e.value.begin(), e.value.end(), 0); } -////////////////////////////////////// +//////////////////////////////////////// // This is used to change the "success" type at each level. // Generally, functions return values of different types. @@ -199,7 +198,7 @@ struct select_result_type template using select_result_t = typename select_result_type::type; -////////////////////////////////////// +//////////////////////////////////////// template struct benchmark @@ -227,7 +226,7 @@ struct benchmark<1, E> } }; -////////////////////////////////////// +//////////////////////////////////////// template NOINLINE int runner( int failure_rate ) noexcept @@ -238,7 +237,7 @@ NOINLINE int runner( int failure_rate ) noexcept return handle_error(r.error()); } -////////////////////////////////////// +//////////////////////////////////////// std::fstream append_csv() { @@ -260,7 +259,7 @@ int print_elapsed_time( int iteration_count, F && f ) { auto start = std::chrono::steady_clock::now(); int val = 0; - for( int i = 0; i!=iteration_count; ++i ) + for( int i=0; i!=iteration_count; ++i ) val += std::forward(f)(); auto stop = std::chrono::steady_clock::now(); int elapsed = std::chrono::duration_cast(stop-start).count(); @@ -269,7 +268,7 @@ int print_elapsed_time( int iteration_count, F && f ) return val; } -////////////////////////////////////// +//////////////////////////////////////// template int benchmark_type( char const * type_name, int iteration_count ) @@ -286,7 +285,7 @@ int benchmark_type( char const * type_name, int iteration_count ) return x; } -////////////////////////////////////// +//////////////////////////////////////// int main() { diff --git a/doc/leaf.adoc b/doc/leaf.adoc index 0e93eec2..7567a6fc 100644 --- a/doc/leaf.adoc +++ b/doc/leaf.adoc @@ -2294,7 +2294,7 @@ namespace boost { namespace leaf { error_id current_error() noexcept; - ////////////////////////////////////////// + //////////////////////////////////////// template class context_activator diff --git a/example/error_log.cpp b/example/error_log.cpp index 51a0cfff..ea19e8cb 100644 --- a/example/error_log.cpp +++ b/example/error_log.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/error_trace.cpp b/example/error_trace.cpp index 2f14a1ba..c3299b95 100644 --- a/example/error_trace.cpp +++ b/example/error_trace.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/exception_to_result.cpp b/example/exception_to_result.cpp index 101063de..d6e3a7b3 100644 --- a/example/exception_to_result.cpp +++ b/example/exception_to_result.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/lua_callback_eh.cpp b/example/lua_callback_eh.cpp index ca02cf6c..ecad96f6 100644 --- a/example/lua_callback_eh.cpp +++ b/example/lua_callback_eh.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/lua_callback_result.cpp b/example/lua_callback_result.cpp index 86d067b0..fc7a046f 100644 --- a/example/lua_callback_result.cpp +++ b/example/lua_callback_result.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/print_file/print_file_eh.cpp b/example/print_file/print_file_eh.cpp index 011738f6..7e1dd79a 100644 --- a/example/print_file/print_file_eh.cpp +++ b/example/print_file/print_file_eh.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -150,7 +149,7 @@ int main( int argc, char const * argv[] ) // Parse the command line, return the file name. char const * parse_command_line( int argc, char const * argv[] ) { - if( argc==2 ) + if( argc == 2 ) return argv[1]; else leaf::throw_exception(bad_command_line); @@ -176,7 +175,7 @@ std::size_t file_size( FILE & f ) leaf::throw_exception(size_error); long s = ftell(&f); - if( s==-1L ) + if( s == -1L ) leaf::throw_exception(size_error); if( fseek(&f,0,SEEK_SET) ) @@ -194,6 +193,6 @@ void file_read( FILE & f, void * buf, std::size_t size ) if( ferror(&f) ) leaf::throw_exception(read_error, leaf::e_errno{errno}); - if( n!=size ) + if( n != size ) leaf::throw_exception(eof_error); } diff --git a/example/print_file/print_file_outcome_result.cpp b/example/print_file/print_file_outcome_result.cpp index a4da30ba..8a7b32ae 100644 --- a/example/print_file/print_file_outcome_result.cpp +++ b/example/print_file/print_file_outcome_result.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -162,7 +161,7 @@ int main( int argc, char const * argv[] ) // Parse the command line, return the file name. result parse_command_line( int argc, char const * argv[] ) { - if( argc==2 ) + if( argc == 2 ) return argv[1]; else return leaf::new_error(bad_command_line); @@ -188,7 +187,7 @@ result file_size( FILE & f ) return leaf::new_error(size_error); long s = ftell(&f); - if( s==-1L ) + if( s == -1L ) return leaf::new_error(size_error); if( fseek(&f,0,SEEK_SET) ) @@ -206,7 +205,7 @@ result file_read( FILE & f, void * buf, std::size_t size ) if( ferror(&f) ) return leaf::new_error(read_error, leaf::e_errno{errno}); - if( n!=size ) + if( n != size ) return leaf::new_error(eof_error); return outcome::success(); diff --git a/example/print_file/print_file_result.cpp b/example/print_file/print_file_result.cpp index 641c7acc..36b67ffd 100644 --- a/example/print_file/print_file_result.cpp +++ b/example/print_file/print_file_result.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -154,7 +153,7 @@ int main( int argc, char const * argv[] ) // Parse the command line, return the file name. result parse_command_line( int argc, char const * argv[] ) { - if( argc==2 ) + if( argc == 2 ) return argv[1]; else return leaf::new_error(bad_command_line); @@ -180,7 +179,7 @@ result file_size( FILE & f ) return leaf::new_error(size_error); long s = ftell(&f); - if( s==-1L ) + if( s == -1L ) return leaf::new_error(size_error); if( fseek(&f,0,SEEK_SET) ) @@ -198,7 +197,7 @@ result file_read( FILE & f, void * buf, std::size_t size ) if( ferror(&f) ) return leaf::new_error(read_error, leaf::e_errno{errno}); - if( n!=size ) + if( n != size ) return leaf::new_error(eof_error); return { }; diff --git a/example/print_half.cpp b/example/print_half.cpp index 10ee5312..1211d277 100644 --- a/example/print_half.cpp +++ b/example/print_half.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/try_capture_all_eh.cpp b/example/try_capture_all_eh.cpp index 4cabe812..588cac45 100644 --- a/example/try_capture_all_eh.cpp +++ b/example/try_capture_all_eh.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/example/try_capture_all_result.cpp b/example/try_capture_all_result.cpp index c700452f..cabe5897 100644 --- a/example/try_capture_all_result.cpp +++ b/example/try_capture_all_result.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/gen/generate_single_header.py b/gen/generate_single_header.py index 071c1267..65035f96 100644 --- a/gen/generate_single_header.py +++ b/gen/generate_single_header.py @@ -23,28 +23,38 @@ import subprocess included = {} -total_line_count = 11 - -def append(input_file_name, input_file, output_file, regex_includes, include_folder): +total_line_count = 14 +def append(input_file_name, input_file, output_file, regex_includes, include_folder, line_directive_prefix, depth): global total_line_count + inside_copyright = False line_count = 1 for line in input_file: line_count += 1 + if 'Emil Dotchevski' in line: + inside_copyright = True + if inside_copyright: + if line.startswith('//') : + continue + if not line.strip(): + inside_copyright = False + if depth > 0: + output_file.write('%s#line %d "%s"\n' % (line_directive_prefix, line_count, input_file_name)) + continue result = regex_includes.search(line) if result: - next_input_file_name = result.group("include") + next_input_file_name = result.group('include') if next_input_file_name in included: - output_file.write("// Expanded at line %d: %s" % (included[next_input_file_name], line)) + output_file.write('// %s // Expanded at line %d\n' % (line.strip(), included[next_input_file_name])) total_line_count += 1 else: included[next_input_file_name] = total_line_count - print("%s (%d)" % (next_input_file_name, total_line_count)) - with open(os.path.join(include_folder, next_input_file_name), "r") as next_input_file: - output_file.write('// >>> %s#line 1 "%s"\n' % (line, next_input_file_name)) + print('%s (%d)' % (next_input_file_name, total_line_count)) + with open(os.path.join(include_folder, next_input_file_name), 'r') as next_input_file: + output_file.write('// >>> %s' % (line)) total_line_count += 2 - append(next_input_file_name, next_input_file, output_file, regex_includes, include_folder) - if not ('include/boost/leaf/detail/all.hpp' in input_file_name): - output_file.write('// <<< %s#line %d "%s"\n' % (line, line_count, input_file_name)) + append(next_input_file_name, next_input_file, output_file, regex_includes, include_folder, line_directive_prefix, depth + 1) + if depth > 0: + output_file.write('// <<< %s%s#line %d "%s"\n' % (line, line_directive_prefix, line_count, input_file_name)) total_line_count += 2 else: output_file.write(line) @@ -52,41 +62,47 @@ def append(input_file_name, input_file, output_file, regex_includes, include_fol def _main(): parser = argparse.ArgumentParser( - description="Generates a single include file from a file including multiple C/C++ headers") - parser.add_argument("-i", "--input", action="store", type=str, default="in.cpp", - help="Input file including the headers to be merged") - parser.add_argument("-o", "--output", action="store", type=str, default="out.cpp", - help="Output file. NOTE: It will be overwritten!") - parser.add_argument("-p", "--path", action="store", type=str, default=".", - help="Include path") - parser.add_argument("--hash", action="store", type=str, - help="The git hash to print in the output file, e.g. the output of \"git rev-parse HEAD\"") - parser.add_argument("prefix", action="store", type=str, - help="Non-empty include file prefix (e.g. a/b)") + description='Generates a single include file from a file including multiple C/C++ headers') + parser.add_argument('-i', '--input', action='store', type=str, default='in.cpp', + help='Input file including the headers to be merged') + parser.add_argument('-o', '--output', action='store', type=str, default='out.cpp', + help='Output file. NOTE: It will be overwritten!') + parser.add_argument('-p', '--path', action='store', type=str, default='.', + help='Include path') + parser.add_argument('--hash', action='store', type=str, + help='The git hash to print in the output file, e.g. the output of "git rev-parse HEAD"') + parser.add_argument('prefix', action='store', type=str, + help='Non-empty include file prefix (e.g. a/b)') + parser.add_argument('--linerefs', action='store_true', + help='Output #line references to the original files. By default the line references are written commented out') args = parser.parse_args() regex_includes = re.compile(r"""^\s*#[\t\s]*include[\t\s]*("|\<)(?P%s.*)("|\>)""" % args.prefix) - print("Rebuilding %s:" % args.input) + print('Rebuilding %s:' % args.input) with open(args.output, 'w') as output_file, open(args.input, 'r') as input_file: output_file.write( '#ifndef BOOST_LEAF_HPP_INCLUDED\n' '#define BOOST_LEAF_HPP_INCLUDED\n' '\n' - '// LEAF single header distribution. Do not edit.\n' - '\n' - '// Generated on ' + date.today().strftime("%m/%d/%Y")) + '// Boost LEAF single header distribution. Do not edit.\n' + '// Generated on ' + date.today().strftime('%b %d, %Y')) if args.hash: output_file.write( ' from https://github.com/boostorg/leaf/tree/' + args.hash[0:7]) output_file.write( '.\n' - '// Latest version of this file: https://raw.githubusercontent.com/boostorg/leaf/gh-pages/leaf.hpp.\n' + '\n' + '// Latest published version of this file: https://raw.githubusercontent.com/boostorg/leaf/gh-pages/leaf.hpp.\n' + '\n' + '// Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc.\n' + '// Distributed under the Boost Software License, Version 1.0. (See accompanying\n' + '// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n' '\n') - append(args.input, input_file, output_file, regex_includes, args.path) + append(args.input, input_file, output_file, regex_includes, args.path, '' if args.linerefs else '// ', 0) output_file.write( '\n' - '#endif\n' ) -# print("%d" % total_line_count) + '#endif // BOOST_LEAF_HPP_INCLUDED\n' ) +# print('%d' % total_line_count) if __name__ == "__main__": _main() diff --git a/include/boost/leaf.hpp b/include/boost/leaf.hpp index 4422d61a..8c2b181a 100644 --- a/include/boost/leaf.hpp +++ b/include/boost/leaf.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/include/boost/leaf/common.hpp b/include/boost/leaf/common.hpp index ec68707f..b67372ed 100644 --- a/include/boost/leaf/common.hpp +++ b/include/boost/leaf/common.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_COMMON_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -112,4 +111,4 @@ namespace windows } } -#endif +#endif // BOOST_LEAF_COMMON_HPP_INCLUDED diff --git a/include/boost/leaf/config.hpp b/include/boost/leaf/config.hpp index a1197ed6..a744c101 100644 --- a/include/boost/leaf/config.hpp +++ b/include/boost/leaf/config.hpp @@ -2,51 +2,35 @@ #define BOOST_LEAF_CONFIG_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) -// The following is based in part on Boost Config. - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Martin Wille 2003. -// (C) Copyright Guillaume Melquiond 2003. - -#ifndef BOOST_LEAF_ASSERT -# include -# define BOOST_LEAF_ASSERT assert -#endif - -//////////////////////////////////////// - #ifdef BOOST_LEAF_TLS_FREERTOS - # ifndef BOOST_LEAF_EMBEDDED # define BOOST_LEAF_EMBEDDED # endif - #endif -//////////////////////////////////////// - #ifdef BOOST_LEAF_EMBEDDED - # ifndef BOOST_LEAF_CFG_DIAGNOSTICS # define BOOST_LEAF_CFG_DIAGNOSTICS 0 # endif - # ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR # define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 0 # endif - # ifndef BOOST_LEAF_CFG_STD_STRING # define BOOST_LEAF_CFG_STD_STRING 0 # endif - # ifndef BOOST_LEAF_CFG_CAPTURE # define BOOST_LEAF_CFG_CAPTURE 0 # endif +#endif + +//////////////////////////////////////// +#ifndef BOOST_LEAF_ASSERT +# include +# define BOOST_LEAF_ASSERT assert #endif //////////////////////////////////////// @@ -87,27 +71,27 @@ # define BOOST_LEAF_CFG_DIAGNOSTICS_DELIMITER "\n " #endif -#if BOOST_LEAF_CFG_DIAGNOSTICS!=0 && BOOST_LEAF_CFG_DIAGNOSTICS!=1 +#if BOOST_LEAF_CFG_DIAGNOSTICS != 0 && BOOST_LEAF_CFG_DIAGNOSTICS != 1 # error BOOST_LEAF_CFG_DIAGNOSTICS must be 0 or 1. #endif -#if BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=0 && BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=1 +#if BOOST_LEAF_CFG_STD_SYSTEM_ERROR != 0 && BOOST_LEAF_CFG_STD_SYSTEM_ERROR != 1 # error BOOST_LEAF_CFG_STD_SYSTEM_ERROR must be 0 or 1. #endif -#if BOOST_LEAF_CFG_STD_STRING!=0 && BOOST_LEAF_CFG_STD_STRING!=1 +#if BOOST_LEAF_CFG_STD_STRING != 0 && BOOST_LEAF_CFG_STD_STRING != 1 # error BOOST_LEAF_CFG_STD_STRING must be 0 or 1. #endif -#if BOOST_LEAF_CFG_CAPTURE!=0 && BOOST_LEAF_CFG_CAPTURE!=1 +#if BOOST_LEAF_CFG_CAPTURE != 0 && BOOST_LEAF_CFG_CAPTURE != 1 # error BOOST_LEAF_CFG_CAPTURE must be 0 or 1. #endif -#if BOOST_LEAF_CFG_WIN32!=0 && BOOST_LEAF_CFG_WIN32!=1 +#if BOOST_LEAF_CFG_WIN32 != 0 && BOOST_LEAF_CFG_WIN32 != 1 # error BOOST_LEAF_CFG_WIN32 must be 0 or 1. #endif -#if BOOST_LEAF_CFG_GNUC_STMTEXPR!=0 && BOOST_LEAF_CFG_GNUC_STMTEXPR!=1 +#if BOOST_LEAF_CFG_GNUC_STMTEXPR != 0 && BOOST_LEAF_CFG_GNUC_STMTEXPR != 1 # error BOOST_LEAF_CFG_GNUC_STMTEXPR must be 0 or 1. #endif @@ -131,78 +115,40 @@ //////////////////////////////////////// -// Configure BOOST_LEAF_NO_EXCEPTIONS, unless already #defined #ifndef BOOST_LEAF_NO_EXCEPTIONS - +// The following is based in part on Boost Config. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. # if defined(__clang__) && !defined(__ibmxl__) // Clang C++ emulates GCC, so it has to appear early. - # if !__has_feature(cxx_exceptions) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__DMC__) -// Digital Mars C++ - -# if !defined(_CPPUNWIND) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__GNUC__) && !defined(__ibmxl__) // GNU C++: - # if !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__KCC) -// Kai C++ - -# if !defined(_EXCEPTIONS) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__CODEGEARC__) // CodeGear - must be checked for before Borland - -# if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - -# elif defined(__BORLANDC__) -// Borland - # if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__MWERKS__) -// Metrowerks CodeWarrior - -# if !__option(exceptions) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) // IBM z/OS XL C/C++ - # if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - # elif defined(__ibmxl__) // IBM XL C/C++ for Linux (Little Endian) - # if !__has_feature(cxx_exceptions) # define BOOST_LEAF_NO_EXCEPTIONS # endif - # elif defined(_MSC_VER) // Microsoft Visual C++ -// // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER - # if !_CPPUNWIND # define BOOST_LEAF_NO_EXCEPTIONS # endif @@ -286,6 +232,4 @@ // Configure TLS access #include -//////////////////////////////////////// - -#endif +#endif // BOOST_LEAF_CONFIG_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls.hpp b/include/boost/leaf/config/tls.hpp index 96c22ca7..0dd42489 100644 --- a/include/boost/leaf/config/tls.hpp +++ b/include/boost/leaf/config/tls.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_CONFIG_TLS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -30,4 +29,4 @@ # include #endif -#endif +#endif // BOOST_LEAF_CONFIG_TLS_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls_array.hpp b/include/boost/leaf/config/tls_array.hpp index a358d75f..456e50f9 100644 --- a/include/boost/leaf/config/tls_array.hpp +++ b/include/boost/leaf/config/tls_array.hpp @@ -2,11 +2,11 @@ #define BOOST_LEAF_CONFIG_TLS_ARRAY_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. -// Copyright (c) 2022 Khalil Estell - // 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 (c) 2022 Khalil Estell + // LEAF requires thread local storage support for pointers and for uin32_t values. // This header implements thread local storage for pointers and for unsigned int @@ -139,20 +139,8 @@ namespace tls static_assert(sizeof(std::intptr_t) >= sizeof(unsigned), "Incompatible tls_array implementation"); write_ptr((Tag *) (void *) (std::intptr_t) x); } - - template - void uint_increment() noexcept - { - write_uint(read_uint() + 1); - } - - template - void uint_decrement() noexcept - { - write_uint(read_uint() - 1); - } } } } -#endif +#endif // BOOST_LEAF_CONFIG_TLS_ARRAY_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls_cpp11.hpp b/include/boost/leaf/config/tls_cpp11.hpp index 89e22794..9828c77a 100644 --- a/include/boost/leaf/config/tls_cpp11.hpp +++ b/include/boost/leaf/config/tls_cpp11.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_CONFIG_TLS_CPP11_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -66,20 +65,8 @@ namespace tls { tagged_uint::x = x; } - - template - void uint_increment() noexcept - { - ++tagged_uint::x; - } - - template - void uint_decrement() noexcept - { - --tagged_uint::x; - } } } } -#endif +#endif // BOOST_LEAF_CONFIG_TLS_CPP11_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls_freertos.hpp b/include/boost/leaf/config/tls_freertos.hpp index 21a1d9cc..d1d0be98 100644 --- a/include/boost/leaf/config/tls_freertos.hpp +++ b/include/boost/leaf/config/tls_freertos.hpp @@ -2,11 +2,11 @@ #define BOOST_LEAF_CONFIG_TLS_FREERTOS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. -// Copyright (c) 2022 Khalil Estell - // 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 (c) 2022 Khalil Estell + // LEAF requires thread local storage support for pointers and for uin32_t values. // This header implements "thread local" storage via FreeTOS functions @@ -44,4 +44,4 @@ namespace tls } } -#endif +#endif // BOOST_LEAF_CONFIG_TLS_FREERTOS_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls_globals.hpp b/include/boost/leaf/config/tls_globals.hpp index 8d1a7372..5e9b1e90 100644 --- a/include/boost/leaf/config/tls_globals.hpp +++ b/include/boost/leaf/config/tls_globals.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_CONFIG_TLS_GLOBALS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -65,20 +64,8 @@ namespace tls { tagged_uint::x = x; } - - template - void uint_increment() noexcept - { - ++tagged_uint::x; - } - - template - void uint_decrement() noexcept - { - --tagged_uint::x; - } } } } -#endif +#endif // BOOST_LEAF_CONFIG_TLS_GLOBALS_HPP_INCLUDED diff --git a/include/boost/leaf/context.hpp b/include/boost/leaf/context.hpp index 294ebae5..15dcb22c 100644 --- a/include/boost/leaf/context.hpp +++ b/include/boost/leaf/context.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_CONTEXT_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -230,7 +229,7 @@ namespace detail } } -//////////////////////////////////////////// +//////////////////////////////////////// namespace detail { @@ -265,7 +264,7 @@ namespace detail using deduce_e_tuple = typename deduce_e_tuple_impl>::type>::type; } -//////////////////////////////////////////// +//////////////////////////////////////// template class context @@ -445,7 +444,7 @@ namespace detail template using context_type_from_handlers = typename detail::context_type_from_handlers_impl::type; -//////////////////////////////////////////// +//////////////////////////////////////// template BOOST_LEAF_CONSTEXPR inline context_type_from_handlers make_context() noexcept @@ -461,4 +460,4 @@ BOOST_LEAF_CONSTEXPR inline context_type_from_handlers make_context( H && } } -#endif +#endif // BOOST_LEAF_CONTEXT_HPP_INCLUDED diff --git a/include/boost/leaf/detail/all.hpp b/include/boost/leaf/detail/all.hpp index a19e5de8..49edc16b 100644 --- a/include/boost/leaf/detail/all.hpp +++ b/include/boost/leaf/detail/all.hpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/include/boost/leaf/detail/capture_list.hpp b/include/boost/leaf/detail/capture_list.hpp index 759571d3..37d24800 100644 --- a/include/boost/leaf/detail/capture_list.hpp +++ b/include/boost/leaf/detail/capture_list.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DETAIL_CAPTURE_LIST_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -122,4 +121,4 @@ namespace detail #endif -#endif +#endif // BOOST_LEAF_DETAIL_CAPTURE_LIST_HPP_INCLUDED diff --git a/include/boost/leaf/detail/demangle.hpp b/include/boost/leaf/detail/demangle.hpp index e56d1d7b..898f29b0 100644 --- a/include/boost/leaf/detail/demangle.hpp +++ b/include/boost/leaf/detail/demangle.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -242,4 +241,4 @@ namespace detail } } -#endif +#endif // BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED diff --git a/include/boost/leaf/detail/function_traits.hpp b/include/boost/leaf/detail/function_traits.hpp index fa800b25..bfc336ce 100644 --- a/include/boost/leaf/detail/function_traits.hpp +++ b/include/boost/leaf/detail/function_traits.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -97,4 +96,4 @@ namespace detail } } -#endif +#endif // BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED diff --git a/include/boost/leaf/detail/mp11.hpp b/include/boost/leaf/detail/mp11.hpp index 38a2788a..10e8e11f 100644 --- a/include/boost/leaf/detail/mp11.hpp +++ b/include/boost/leaf/detail/mp11.hpp @@ -300,4 +300,4 @@ template class F, class... T> using mp_valid = typename detai } } } -#endif +#endif // BOOST_LEAF_DETAIL_MP11_HPP_INCLUDED diff --git a/include/boost/leaf/detail/optional.hpp b/include/boost/leaf/detail/optional.hpp index 57a6c2aa..60c77835 100644 --- a/include/boost/leaf/detail/optional.hpp +++ b/include/boost/leaf/detail/optional.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -90,7 +89,7 @@ namespace detail BOOST_LEAF_CONSTEXPR bool empty() const noexcept { - return key_==0; + return key_ == 0; } BOOST_LEAF_CONSTEXPR int key() const noexcept @@ -147,13 +146,13 @@ namespace detail BOOST_LEAF_CONSTEXPR T const * has_value(int key) const noexcept { BOOST_LEAF_ASSERT(key); - return key_==key ? &value_ : nullptr; + return key_ == key ? &value_ : nullptr; } BOOST_LEAF_CONSTEXPR T * has_value(int key) noexcept { BOOST_LEAF_ASSERT(key); - return key_==key ? &value_ : nullptr; + return key_ == key ? &value_ : nullptr; } BOOST_LEAF_CONSTEXPR T const & value(int key) const & noexcept @@ -199,4 +198,4 @@ namespace detail } } -#endif +#endif // BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED diff --git a/include/boost/leaf/detail/print.hpp b/include/boost/leaf/detail/print.hpp index bc5cdec2..2189fb29 100644 --- a/include/boost/leaf/detail/print.hpp +++ b/include/boost/leaf/detail/print.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -160,4 +159,4 @@ namespace detail } } -#endif +#endif // BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED diff --git a/include/boost/leaf/diagnostics.hpp b/include/boost/leaf/diagnostics.hpp index 1a93e7e8..5ab490f5 100644 --- a/include/boost/leaf/diagnostics.hpp +++ b/include/boost/leaf/diagnostics.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_DIAGNOSTICS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -291,4 +290,4 @@ using verbose_diagnostic_info = diagnostic_details; } } -#endif +#endif // BOOST_LEAF_DIAGNOSTICS_HPP_INCLUDED diff --git a/include/boost/leaf/error.hpp b/include/boost/leaf/error.hpp index 5264bbcd..08f0efd1 100644 --- a/include/boost/leaf/error.hpp +++ b/include/boost/leaf/error.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_ERROR_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -125,7 +124,7 @@ namespace detail optional(std::move(x)), prev_(nullptr) { - BOOST_LEAF_ASSERT(x.prev_==nullptr); + BOOST_LEAF_ASSERT(x.prev_ == nullptr); } ~slot() noexcept @@ -413,7 +412,7 @@ namespace detail inline void slot::unload( int err_id ) noexcept(!BOOST_LEAF_CFG_CAPTURE) { BOOST_LEAF_ASSERT(err_id); - if( this->key()!=err_id ) + if( this->key() != err_id ) return; if( impl * p = tls::read_ptr>() ) { @@ -432,7 +431,7 @@ namespace detail using T = typename std::decay::type; static_assert(!std::is_pointer::value, "Error objects of pointer types are not allowed"); static_assert(!std::is_same::value, "Error objects of type error_id are not allowed"); - BOOST_LEAF_ASSERT((err_id&3)==1); + BOOST_LEAF_ASSERT((err_id&3) == 1); if( slot * p = tls::read_ptr>() ) { if( !OnError || !p->has_value(err_id) ) @@ -452,7 +451,7 @@ namespace detail using T = typename std::decay::type; static_assert(!std::is_pointer::value, "Error objects of pointer types are not allowed"); static_assert(!std::is_same::value, "Error objects of type error_id are not allowed"); - BOOST_LEAF_ASSERT((err_id&3)==1); + BOOST_LEAF_ASSERT((err_id&3) == 1); if( slot * p = tls::read_ptr>() ) { if( !OnError || !p->has_value(err_id) ) @@ -468,10 +467,10 @@ namespace detail template BOOST_LEAF_CONSTEXPR inline int load_slot_accumulate( int err_id, F && f ) noexcept(OnError) { - static_assert(function_traits::arity==1, "Lambdas passed to accumulate must take a single e-type argument by reference"); + static_assert(function_traits::arity == 1, "Lambdas passed to accumulate must take a single e-type argument by reference"); using E = typename std::decay>::type; static_assert(!std::is_pointer::value, "Error objects of pointer types are not allowed"); - BOOST_LEAF_ASSERT((err_id&3)==1); + BOOST_LEAF_ASSERT((err_id&3) == 1); if( auto sl = tls::read_ptr>() ) { if( auto v = sl->has_value(err_id) ) @@ -494,7 +493,7 @@ namespace detail template ::arity> struct load_item { - static_assert(Arity==0 || Arity==1, "If a functions is passed to new_error or load, it must take zero or one argument"); + static_assert(Arity == 0 || Arity == 1, "If a functions is passed to new_error or load, it must take zero or one argument"); }; template @@ -539,7 +538,7 @@ namespace detail BOOST_LEAF_CONSTEXPR static unsigned generate_next_id() noexcept { auto id = (counter+=4); - BOOST_LEAF_ASSERT((id&3)==1); + BOOST_LEAF_ASSERT((id&3) == 1); return id; } }; @@ -550,7 +549,7 @@ namespace detail inline int current_id() noexcept { unsigned id = tls::read_uint(); - BOOST_LEAF_ASSERT(id==0 || (id&3)==1); + BOOST_LEAF_ASSERT(id == 0 || (id&3) == 1); return int(id); } @@ -606,7 +605,7 @@ namespace detail std::error_category const & cat = get_error_category<>::cat; if( &ec.category() == &cat ) { - BOOST_LEAF_ASSERT((err_id&3)==1); + BOOST_LEAF_ASSERT((err_id&3) == 1); return (err_id&~3)|1; } else @@ -624,7 +623,7 @@ namespace detail inline bool is_error_id( std::error_code const & ec ) noexcept { bool res = (&ec.category() == &detail::get_error_category<>::cat); - BOOST_LEAF_ASSERT(!res || !ec.value() || ((ec.value()&3)==1)); + BOOST_LEAF_ASSERT(!res || !ec.value() || ((ec.value()&3) == 1)); return res; } @@ -646,7 +645,7 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id BOOST_LEAF_CONSTEXPR explicit error_id( int value ) noexcept: value_(value) { - BOOST_LEAF_ASSERT(value_==0 || ((value_&3)==1)); + BOOST_LEAF_ASSERT(value_ == 0 || ((value_&3) == 1)); } public: @@ -660,7 +659,7 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id error_id( std::error_code const & ec ) noexcept: value_(detail::import_error_code(ec)) { - BOOST_LEAF_ASSERT(!value_ || ((value_&3)==1)); + BOOST_LEAF_ASSERT(!value_ || ((value_&3) == 1)); } template @@ -704,7 +703,7 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id BOOST_LEAF_CONSTEXPR int value() const noexcept { - BOOST_LEAF_ASSERT(value_==0 || ((value_&3)==1)); + BOOST_LEAF_ASSERT(value_ == 0 || ((value_&3) == 1)); return value_; } @@ -748,7 +747,7 @@ namespace detail { BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept { - BOOST_LEAF_ASSERT(err_id==0 || (err_id&3)==1); + BOOST_LEAF_ASSERT(err_id == 0 || (err_id&3) == 1); return error_id((err_id&~3)|1); } } @@ -769,7 +768,7 @@ inline error_id current_error() noexcept return detail::make_error_id(detail::current_id()); } -//////////////////////////////////////////// +//////////////////////////////////////// template struct is_result_type: std::false_type @@ -783,4 +782,4 @@ struct is_result_type: is_result_type } } -#endif +#endif // BOOST_LEAF_ERROR_HPP_INCLUDED diff --git a/include/boost/leaf/exception.hpp b/include/boost/leaf/exception.hpp index fe0c1c33..c0224573 100644 --- a/include/boost/leaf/exception.hpp +++ b/include/boost/leaf/exception.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_EXCEPTION_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -284,4 +283,4 @@ exception_to_result( F && f ) noexcept } } -#endif +#endif // BOOST_LEAF_EXCEPTION_HPP_INCLUDED diff --git a/include/boost/leaf/handle_errors.hpp b/include/boost/leaf/handle_errors.hpp index 88b11f92..ade0f135 100644 --- a/include/boost/leaf/handle_errors.hpp +++ b/include/boost/leaf/handle_errors.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -880,4 +879,4 @@ namespace detail } } -#endif +#endif // BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED diff --git a/include/boost/leaf/on_error.hpp b/include/boost/leaf/on_error.hpp index 439c433f..a01bce52 100644 --- a/include/boost/leaf/on_error.hpp +++ b/include/boost/leaf/on_error.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_ON_ERROR_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -67,7 +66,7 @@ class error_monitor } }; -//////////////////////////////////////////// +//////////////////////////////////////// namespace detail { @@ -76,7 +75,7 @@ namespace detail { BOOST_LEAF_CONSTEXPR static void trigger( Tup & tup, int err_id ) noexcept { - BOOST_LEAF_ASSERT((err_id&3)==1); + BOOST_LEAF_ASSERT((err_id&3) == 1); tuple_for_each_preload::trigger(tup,err_id); std::get(tup).trigger(err_id); } @@ -230,4 +229,4 @@ on_error( Item && ... i ) } } -#endif +#endif // BOOST_LEAF_ON_ERROR_HPP_INCLUDED diff --git a/include/boost/leaf/pred.hpp b/include/boost/leaf/pred.hpp index f36e6636..136368a7 100644 --- a/include/boost/leaf/pred.hpp +++ b/include/boost/leaf/pred.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_PRED_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -151,7 +150,7 @@ namespace detail template struct match_value_enum_type> { - static_assert(sizeof(Enum)==0, "leaf::condition should be used with leaf::match<>, not with leaf::match_value<>"); + static_assert(sizeof(Enum) == 0, "leaf::condition should be used with leaf::match<>, not with leaf::match_value<>"); }; #endif } @@ -241,13 +240,13 @@ namespace detail template BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::exception const & ex, Ex const * ) noexcept { - return dynamic_cast(&ex)!=nullptr; + return dynamic_cast(&ex) != nullptr; } template BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::exception const & ex, Ex const *, ExRest const * ... ex_rest ) noexcept { - return dynamic_cast(&ex)!=nullptr || check_exception_pack(ex, ex_rest...); + return dynamic_cast(&ex) != nullptr || check_exception_pack(ex, ex_rest...); } BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::exception const & ) noexcept @@ -294,4 +293,4 @@ struct is_predicate>: std::true_type } } -#endif +#endif // BOOST_LEAF_PRED_HPP_INCLUDED diff --git a/include/boost/leaf/result.hpp b/include/boost/leaf/result.hpp index e8577afc..e518fe99 100644 --- a/include/boost/leaf/result.hpp +++ b/include/boost/leaf/result.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_RESULT_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -129,7 +128,7 @@ namespace detail state_(id.value()) { BOOST_LEAF_ASSERT(state_ == 0 || (state_&3) == 1); - BOOST_LEAF_ASSERT(kind()==err_id_zero || kind()==err_id); + BOOST_LEAF_ASSERT(kind() == err_id_zero || kind() == err_id); } #if BOOST_LEAF_CFG_CAPTURE @@ -146,7 +145,7 @@ namespace detail state_(val) { BOOST_LEAF_ASSERT((state_&3) == 3); - BOOST_LEAF_ASSERT(kind()==val); + BOOST_LEAF_ASSERT(kind() == val); } kind_t kind() const noexcept @@ -156,7 +155,7 @@ namespace detail error_id get_error_id() const noexcept { - BOOST_LEAF_ASSERT(kind()==err_id_zero || kind()==err_id || kind()==err_id_capture_list); + BOOST_LEAF_ASSERT(kind() == err_id_zero || kind() == err_id || kind() == err_id_capture_list); return make_error_id(int((state_&~3)|1)); } }; @@ -725,4 +724,4 @@ struct is_result_type>: std::true_type } } -#endif +#endif // BOOST_LEAF_RESULT_HPP_INCLUDED diff --git a/include/boost/leaf/to_variant.hpp b/include/boost/leaf/to_variant.hpp index df411930..2acd1b05 100644 --- a/include/boost/leaf/to_variant.hpp +++ b/include/boost/leaf/to_variant.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_TO_VARIANT_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -47,4 +46,4 @@ to_variant( TryBlock && try_block ) #endif -#endif +#endif // BOOST_LEAF_TO_VARIANT_HPP_INCLUDED diff --git a/meson.build b/meson.build index 6c80037c..f95254f5 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ project('leaf', 'cpp', default_options : ['cpp_std=c++17', 'b_pch=false'], license : 'boost') -option_leaf_hpp = get_option('leaf_hpp') +option_single_header = get_option('single_header') option_boost = get_option('leaf_boost_examples') option_lua = get_option('leaf_lua_examples') option_diagnostics = get_option('leaf_diagnostics') @@ -202,7 +202,7 @@ if option_enable_unit_tests endif dep_test_single_header = [] - if option_leaf_hpp + if option_single_header dep_test_single_header = declare_dependency(compile_args: ['-DBOOST_LEAF_TEST_SINGLE_HEADER']) endif diff --git a/meson_options.txt b/meson_options.txt index de865fa5..98afa2bd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ -option('leaf_hpp',type:'boolean',value:false,description:'Unit tests #include instead of individual headers') +option('single_header',type:'boolean',value:false,description:'Unit tests #include "leaf.hpp" instead of individual headers') option('leaf_boost_examples',type:'boolean',value:false,description:'Builds the Boost examples and Boost Outcome benchmark') option('leaf_lua_examples',type:'boolean',value:false,description:'Enable or disable downloading of Lua and building the Lua examples') option('leaf_diagnostics',type:'integer',value:1,description:'BOOST_LEAF_CFG_DIAGNOSTICS value') diff --git a/test/BOOST_LEAF_ASSIGN_test.cpp b/test/BOOST_LEAF_ASSIGN_test.cpp index 8917b9bb..1b974f4a 100644 --- a/test/BOOST_LEAF_ASSIGN_test.cpp +++ b/test/BOOST_LEAF_ASSIGN_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/BOOST_LEAF_AUTO_test.cpp b/test/BOOST_LEAF_AUTO_test.cpp index 497ce448..a56dff68 100644 --- a/test/BOOST_LEAF_AUTO_test.cpp +++ b/test/BOOST_LEAF_AUTO_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/BOOST_LEAF_CHECK_test.cpp b/test/BOOST_LEAF_CHECK_test.cpp index 4de5b885..e6c4523e 100644 --- a/test/BOOST_LEAF_CHECK_test.cpp +++ b/test/BOOST_LEAF_CHECK_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 04a941a5..52285a25 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -14,8 +14,8 @@ variant leaf_release_diag0 : release : BOOST_LEAF_CFG_DIAGNOSTICS=0 ; variant leaf_debug_embedded : debug : BOOST_LEAF_EMBEDDED off off ; variant leaf_release_embedded : release : BOOST_LEAF_EMBEDDED off off ; -variant leaf_debug_leaf_hpp : debug : BOOST_LEAF_TEST_SINGLE_HEADER ; -variant leaf_release_leaf_hpp : release : BOOST_LEAF_TEST_SINGLE_HEADER ; +variant leaf_debug_single_header : debug : BOOST_LEAF_TEST_SINGLE_HEADER ; +variant leaf_release_single_header : release : BOOST_LEAF_TEST_SINGLE_HEADER ; project : default-build diff --git a/test/_compile-fail-BOOST_LEAF_ASSIGN.cpp b/test/_compile-fail-BOOST_LEAF_ASSIGN.cpp index 93bb85bf..854f47f2 100644 --- a/test/_compile-fail-BOOST_LEAF_ASSIGN.cpp +++ b/test/_compile-fail-BOOST_LEAF_ASSIGN.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-BOOST_LEAF_AUTO.cpp b/test/_compile-fail-BOOST_LEAF_AUTO.cpp index ab980a0f..4e0970cf 100644 --- a/test/_compile-fail-BOOST_LEAF_AUTO.cpp +++ b/test/_compile-fail-BOOST_LEAF_AUTO.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_boost_error_info_1.cpp b/test/_compile-fail-arg_boost_error_info_1.cpp index 459689da..4ff8a7e2 100644 --- a/test/_compile-fail-arg_boost_error_info_1.cpp +++ b/test/_compile-fail-arg_boost_error_info_1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_boost_error_info_2.cpp b/test/_compile-fail-arg_boost_error_info_2.cpp index 459689da..4ff8a7e2 100644 --- a/test/_compile-fail-arg_boost_error_info_2.cpp +++ b/test/_compile-fail-arg_boost_error_info_2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_catch_1.cpp b/test/_compile-fail-arg_catch_1.cpp index 3e587325..a3bdce06 100644 --- a/test/_compile-fail-arg_catch_1.cpp +++ b/test/_compile-fail-arg_catch_1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_catch_2.cpp b/test/_compile-fail-arg_catch_2.cpp index 2cf7286e..6d99ac67 100644 --- a/test/_compile-fail-arg_catch_2.cpp +++ b/test/_compile-fail-arg_catch_2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_match_1.cpp b/test/_compile-fail-arg_match_1.cpp index a184f857..85307a73 100644 --- a/test/_compile-fail-arg_match_1.cpp +++ b/test/_compile-fail-arg_match_1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_match_2.cpp b/test/_compile-fail-arg_match_2.cpp index d669732d..fec38421 100644 --- a/test/_compile-fail-arg_match_2.cpp +++ b/test/_compile-fail-arg_match_2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-arg_rvalue_ref.cpp b/test/_compile-fail-arg_rvalue_ref.cpp index b167ab81..44155227 100644 --- a/test/_compile-fail-arg_rvalue_ref.cpp +++ b/test/_compile-fail-arg_rvalue_ref.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-diagnostic_details.cpp b/test/_compile-fail-diagnostic_details.cpp index 301681b2..e45dfbd5 100644 --- a/test/_compile-fail-diagnostic_details.cpp +++ b/test/_compile-fail-diagnostic_details.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-diagnostic_info.cpp b/test/_compile-fail-diagnostic_info.cpp index c5192a13..15c24189 100644 --- a/test/_compile-fail-diagnostic_info.cpp +++ b/test/_compile-fail-diagnostic_info.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-error_info.cpp b/test/_compile-fail-error_info.cpp index c37f99a0..358cb82b 100644 --- a/test/_compile-fail-error_info.cpp +++ b/test/_compile-fail-error_info.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-exception_1.cpp b/test/_compile-fail-exception_1.cpp index a4c177bc..10b65d0c 100644 --- a/test/_compile-fail-exception_1.cpp +++ b/test/_compile-fail-exception_1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-exception_2.cpp b/test/_compile-fail-exception_2.cpp index a8534107..0536c8e5 100644 --- a/test/_compile-fail-exception_2.cpp +++ b/test/_compile-fail-exception_2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-new_error.cpp b/test/_compile-fail-new_error.cpp index c0d0c8ac..5995878c 100644 --- a/test/_compile-fail-new_error.cpp +++ b/test/_compile-fail-new_error.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-result_1.cpp b/test/_compile-fail-result_1.cpp index f3e22b52..fc29317e 100644 --- a/test/_compile-fail-result_1.cpp +++ b/test/_compile-fail-result_1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_compile-fail-result_4.cpp b/test/_compile-fail-result_4.cpp index 9c3b4548..545eeb8b 100644 --- a/test/_compile-fail-result_4.cpp +++ b/test/_compile-fail-result_4.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_capture_test.cpp b/test/_hpp_capture_test.cpp index 2aaf5271..99bd00e9 100644 --- a/test/_hpp_capture_test.cpp +++ b/test/_hpp_capture_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_common_test.cpp b/test/_hpp_common_test.cpp index 4b95387d..fa52f4dc 100644 --- a/test/_hpp_common_test.cpp +++ b/test/_hpp_common_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_config_test.cpp b/test/_hpp_config_test.cpp index d44692e4..cc1017a6 100644 --- a/test/_hpp_config_test.cpp +++ b/test/_hpp_config_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_context_test.cpp b/test/_hpp_context_test.cpp index dd09db16..3b3ea326 100644 --- a/test/_hpp_context_test.cpp +++ b/test/_hpp_context_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_diagnostics_test.cpp b/test/_hpp_diagnostics_test.cpp index bca06ea2..613c28ee 100644 --- a/test/_hpp_diagnostics_test.cpp +++ b/test/_hpp_diagnostics_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_error_test.cpp b/test/_hpp_error_test.cpp index c3943d0c..9e363d4c 100644 --- a/test/_hpp_error_test.cpp +++ b/test/_hpp_error_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_exception_test.cpp b/test/_hpp_exception_test.cpp index 786afe65..c6365d0a 100644 --- a/test/_hpp_exception_test.cpp +++ b/test/_hpp_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_handle_errors_test.cpp b/test/_hpp_handle_errors_test.cpp index 3af305ab..8038f511 100644 --- a/test/_hpp_handle_errors_test.cpp +++ b/test/_hpp_handle_errors_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_leaf_test.cpp b/test/_hpp_leaf_test.cpp index 27e27d2d..6446d233 100644 --- a/test/_hpp_leaf_test.cpp +++ b/test/_hpp_leaf_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_on_error_test.cpp b/test/_hpp_on_error_test.cpp index 73c02720..bfa697f1 100644 --- a/test/_hpp_on_error_test.cpp +++ b/test/_hpp_on_error_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_pred_test.cpp b/test/_hpp_pred_test.cpp index 6e6e9a21..c2a5405a 100644 --- a/test/_hpp_pred_test.cpp +++ b/test/_hpp_pred_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_result_test.cpp b/test/_hpp_result_test.cpp index 5f43f2dd..cf838cf7 100644 --- a/test/_hpp_result_test.cpp +++ b/test/_hpp_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_hpp_to_variant_test.cpp b/test/_hpp_to_variant_test.cpp index f0ea618d..b79a9061 100644 --- a/test/_hpp_to_variant_test.cpp +++ b/test/_hpp_to_variant_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/_test_ec.hpp b/test/_test_ec.hpp index 6f42f71f..cf0070e7 100644 --- a/test/_test_ec.hpp +++ b/test/_test_ec.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_TEST_EC_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -43,7 +42,7 @@ inline std::error_code make_error_code( errc_a code ) template struct e_errc_a { std::error_code value; }; -/////////////////////////////////// +//////////////////////////////////////// enum class errc_b { b0 = 20, b1, b2, b3 }; @@ -80,7 +79,7 @@ inline std::error_code make_error_code( errc_b code ) template struct e_errc_b { std::error_code value; }; -/////////////////////////////////// +//////////////////////////////////////// enum class cond_x { x00 = 30, x11, x22, x33 }; @@ -115,13 +114,13 @@ inline std::error_category const & cat_cond_x() switch( cond_x(cond) ) { case cond_x::x00: - return code==make_error_code(errc_a::a0) || code==make_error_code(errc_b::b0); + return code == make_error_code(errc_a::a0) || code == make_error_code(errc_b::b0); case cond_x::x11: - return code==make_error_code(errc_a::a1) || code==make_error_code(errc_b::b1); + return code == make_error_code(errc_a::a1) || code == make_error_code(errc_b::b1); case cond_x::x22: - return code==make_error_code(errc_a::a2) || code==make_error_code(errc_b::b2); + return code == make_error_code(errc_a::a2) || code == make_error_code(errc_b::b2); case cond_x::x33: - return code==make_error_code(errc_a::a3) || code==make_error_code(errc_b::b3); + return code == make_error_code(errc_a::a3) || code == make_error_code(errc_b::b3); default: return false; } @@ -138,7 +137,7 @@ inline std::error_condition make_error_condition( cond_x cond ) template struct e_cond_x { cond_x value; }; -/////////////////////////////////// +//////////////////////////////////////// enum class cond_y { y03 = 40, y12, y21, y30 }; @@ -173,13 +172,13 @@ inline std::error_category const & cat_cond_y() switch( cond_y(cond) ) { case cond_y::y03: - return code==make_error_code(errc_a::a0) || code==make_error_code(errc_b::b0); + return code == make_error_code(errc_a::a0) || code == make_error_code(errc_b::b0); case cond_y::y12: - return code==make_error_code(errc_a::a1) || code==make_error_code(errc_b::b1); + return code == make_error_code(errc_a::a1) || code == make_error_code(errc_b::b1); case cond_y::y21: - return code==make_error_code(errc_a::a2) || code==make_error_code(errc_b::b2); + return code == make_error_code(errc_a::a2) || code == make_error_code(errc_b::b2); case cond_y::y30: - return code==make_error_code(errc_a::a3) || code==make_error_code(errc_b::b3); + return code == make_error_code(errc_a::a3) || code == make_error_code(errc_b::b3); default: return false; } diff --git a/test/_test_res.hpp b/test/_test_res.hpp index 5f284e1e..26cb3bcd 100644 --- a/test/_test_res.hpp +++ b/test/_test_res.hpp @@ -2,7 +2,6 @@ #define BOOST_LEAF_TEST_RES_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -41,16 +40,16 @@ class test_res } explicit operator bool() const noexcept { - return which_==variant::value; + return which_ == variant::value; } T const & value() const { - BOOST_LEAF_ASSERT(which_==variant::value); + BOOST_LEAF_ASSERT(which_ == variant::value); return value_; } E const & error() const { - BOOST_LEAF_ASSERT(which_==variant::error); + BOOST_LEAF_ASSERT(which_ == variant::error); return error_; } }; @@ -84,15 +83,15 @@ class test_res } explicit operator bool() const noexcept { - return which_==variant::value; + return which_ == variant::value; } void value() const { - BOOST_LEAF_ASSERT(which_==variant::value); + BOOST_LEAF_ASSERT(which_ == variant::value); } E const & error() const { - BOOST_LEAF_ASSERT(which_==variant::error); + BOOST_LEAF_ASSERT(which_ == variant::error); return error_; } }; diff --git a/test/boost_exception_test.cpp b/test/boost_exception_test.cpp index 3c48d9bb..318a71f8 100644 --- a/test/boost_exception_test.cpp +++ b/test/boost_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_exception_async_test.cpp b/test/capture_exception_async_test.cpp index 79be2fcb..21d681fd 100644 --- a/test/capture_exception_async_test.cpp +++ b/test/capture_exception_async_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -47,7 +46,7 @@ struct fut_info template std::vector launch_tasks( int task_count, F f ) { - BOOST_LEAF_ASSERT(task_count>0); + BOOST_LEAF_ASSERT(task_count > 0); std::vector fut; std::generate_n( std::back_inserter(fut), task_count, [=] diff --git a/test/capture_exception_result_async_test.cpp b/test/capture_exception_result_async_test.cpp index a0f9734c..6498380d 100644 --- a/test/capture_exception_result_async_test.cpp +++ b/test/capture_exception_result_async_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_exception_result_unload_test.cpp b/test/capture_exception_result_unload_test.cpp index bbf5a213..4085089d 100644 --- a/test/capture_exception_result_unload_test.cpp +++ b/test/capture_exception_result_unload_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_exception_state_test.cpp b/test/capture_exception_state_test.cpp index a851edbc..5983e5cb 100644 --- a/test/capture_exception_state_test.cpp +++ b/test/capture_exception_state_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_exception_unload_test.cpp b/test/capture_exception_unload_test.cpp index 5802a6c3..811dda9d 100644 --- a/test/capture_exception_unload_test.cpp +++ b/test/capture_exception_unload_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_result_async_test.cpp b/test/capture_result_async_test.cpp index 09e7f63a..8067a0df 100644 --- a/test/capture_result_async_test.cpp +++ b/test/capture_result_async_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_result_state_test.cpp b/test/capture_result_state_test.cpp index 31b142f4..41125aa9 100644 --- a/test/capture_result_state_test.cpp +++ b/test/capture_result_state_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/capture_result_unload_test.cpp b/test/capture_result_unload_test.cpp index a1ddb86d..91ac63e9 100644 --- a/test/capture_result_unload_test.cpp +++ b/test/capture_result_unload_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/context_activator_test.cpp b/test/context_activator_test.cpp index c5d82f59..357eaca1 100644 --- a/test/context_activator_test.cpp +++ b/test/context_activator_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -33,7 +32,7 @@ int main() auto error_handlers = std::make_tuple( []( info<1> x ) { - BOOST_TEST(x.value==1); + BOOST_TEST_EQ(x.value, 1); return 1; }, [] diff --git a/test/context_deduction_test.cpp b/test/context_deduction_test.cpp index 150d0470..f9908c11 100644 --- a/test/context_deduction_test.cpp +++ b/test/context_deduction_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/ctx_handle_all_test.cpp b/test/ctx_handle_all_test.cpp index 2ece0dee..15ed9d49 100644 --- a/test/ctx_handle_all_test.cpp +++ b/test/ctx_handle_all_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -41,7 +40,7 @@ int main() r1.error(), []( info<1> x ) { - BOOST_TEST(x.value==1); + BOOST_TEST_EQ(x.value, 1); return 1; }, []( leaf::diagnostic_details const & info ) diff --git a/test/ctx_handle_some_test.cpp b/test/ctx_handle_some_test.cpp index 139549d2..1c43a720 100644 --- a/test/ctx_handle_some_test.cpp +++ b/test/ctx_handle_some_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -40,7 +39,7 @@ int main() r1.error(), []( info<1> x ) -> leaf::result { - BOOST_TEST(x.value==1); + BOOST_TEST_EQ(x.value, 1); return 1; }, [&r1] diff --git a/test/ctx_remote_handle_all_test.cpp b/test/ctx_remote_handle_all_test.cpp index a792ada1..05f6f61d 100644 --- a/test/ctx_remote_handle_all_test.cpp +++ b/test/ctx_remote_handle_all_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -34,7 +33,7 @@ int main() auto handlers = std::make_tuple( []( info<1> x ) { - BOOST_TEST(x.value==1); + BOOST_TEST_EQ(x.value, 1); return 1; }, []( leaf::diagnostic_details const & info ) diff --git a/test/ctx_remote_handle_some_test.cpp b/test/ctx_remote_handle_some_test.cpp index ef57e12e..f41e1ed9 100644 --- a/test/ctx_remote_handle_some_test.cpp +++ b/test/ctx_remote_handle_some_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -33,7 +32,7 @@ int main() auto handle_error = std::make_tuple( []( info<1> x ) { - BOOST_TEST(x.value==1); + BOOST_TEST_EQ(x.value, 1); return 1; }, []( leaf::error_info const & ei ) diff --git a/test/diagnostics_test1.cpp b/test/diagnostics_test1.cpp index a5fb462d..9ec183e5 100644 --- a/test/diagnostics_test1.cpp +++ b/test/diagnostics_test1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -479,7 +478,7 @@ int main() BOOST_ERROR("Bad error dispatch"); } ); - /////////////////////////////////// + //////////////////////////////////////// #ifndef BOOST_LEAF_NO_EXCEPTIONS diff --git a/test/diagnostics_test2.cpp b/test/diagnostics_test2.cpp index 9f4bda45..2024f1ae 100644 --- a/test/diagnostics_test2.cpp +++ b/test/diagnostics_test2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/diagnostics_test3.cpp b/test/diagnostics_test3.cpp index 7a2b8b0f..c38b0d5d 100644 --- a/test/diagnostics_test3.cpp +++ b/test/diagnostics_test3.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/diagnostics_test4.cpp b/test/diagnostics_test4.cpp index 637d61c7..c6bbad06 100644 --- a/test/diagnostics_test4.cpp +++ b/test/diagnostics_test4.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/diagnostics_test5.cpp b/test/diagnostics_test5.cpp index 0c81a604..2f554125 100644 --- a/test/diagnostics_test5.cpp +++ b/test/diagnostics_test5.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/diagnostics_test6.cpp b/test/diagnostics_test6.cpp index 082ff938..c32759d4 100644 --- a/test/diagnostics_test6.cpp +++ b/test/diagnostics_test6.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/e_LastError_test.cpp b/test/e_LastError_test.cpp index 757f465e..a8d1cc0c 100644 --- a/test/e_LastError_test.cpp +++ b/test/e_LastError_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -43,7 +42,7 @@ int main() std::string s = ss.str(); std::cout << s << std::endl; #if BOOST_LEAF_CFG_DIAGNOSTICS - BOOST_TEST(ss.str().find("The system cannot find the file specified") != std::string::npos); + BOOST_TEST_NE(ss.str().find("The system cannot find the file specified"), std::string::npos); #endif #endif diff --git a/test/e_errno_test.cpp b/test/e_errno_test.cpp index d0d77bfd..d59faeab 100644 --- a/test/e_errno_test.cpp +++ b/test/e_errno_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -29,7 +28,7 @@ int main() std::string s = ss.str(); std::cout << s << std::endl; #if BOOST_LEAF_CFG_STD_DIAGNOSTICS - BOOST_TEST(s.find(std::strerror(ENOENT)) != std::string::npos); + BOOST_TEST_NE(s.find(std::strerror(ENOENT)), std::string::npos); #endif #endif diff --git a/test/error_code_test.cpp b/test/error_code_test.cpp index 18f63ebe..cc3ed35c 100644 --- a/test/error_code_test.cpp +++ b/test/error_code_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -179,7 +178,7 @@ void test() { std::error_code const & ec = cond.matched; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); return 42; }, [] @@ -199,7 +198,7 @@ void test() { std::error_code const & ec = cond.matched; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); return 42; }, [] @@ -279,7 +278,7 @@ void test() e_wrapped_error_code const & wec = cond.matched; std::error_code const & ec = wec.value; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); return 42; }, [] @@ -300,7 +299,7 @@ void test() e_wrapped_error_code const & wec = cond.matched; std::error_code const & ec = wec.value; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); return 42; }, [] @@ -467,7 +466,7 @@ void test_void() { std::error_code const & ec = cond.matched; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); r = 42; }, [&] @@ -488,7 +487,7 @@ void test_void() { std::error_code const & ec = cond.matched; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); r = 42; }, [&] @@ -572,7 +571,7 @@ void test_void() e_wrapped_error_code const & wec = cond.matched; std::error_code const & ec = wec.value; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); r = 42; }, [&] @@ -594,7 +593,7 @@ void test_void() e_wrapped_error_code const & wec = cond.matched; std::error_code const & ec = wec.value; BOOST_TEST_EQ(ec, errc_a::a0); - BOOST_TEST(ec==make_error_condition(cond_x::x00)); + BOOST_TEST(ec == make_error_condition(cond_x::x00)); r = 42; }, [&] diff --git a/test/error_id_test.cpp b/test/error_id_test.cpp index 6afa8f86..de0395b8 100644 --- a/test/error_id_test.cpp +++ b/test/error_id_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -45,10 +44,10 @@ int main() BOOST_TEST_EQ(e1.value(), 0); BOOST_TEST(!e2); BOOST_TEST_EQ(e2.value(), 0); - BOOST_TEST(e1==e2); - BOOST_TEST(!(e1!=e2)); - BOOST_TEST(!(e1 all_ids = generate_ids(); @@ -121,7 +120,7 @@ int main() #endif std::sort(all_ids.begin(), all_ids.end()); auto u = std::unique(all_ids.begin(), all_ids.end()); - BOOST_TEST(u==all_ids.end()); + BOOST_TEST(u == all_ids.end()); return boost::report_errors(); } diff --git a/test/exception_test.cpp b/test/exception_test.cpp index a0fdfebf..3cd926d2 100644 --- a/test/exception_test.cpp +++ b/test/exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -200,7 +199,7 @@ int main() { wh = ex.what(); } ); - BOOST_TEST(wh!=0 || !strcmp(wh,"Test")); + BOOST_TEST(wh != 0 || !strcmp(wh,"Test")); } { diff --git a/test/exception_to_result_test.cpp b/test/exception_to_result_test.cpp index f6e73d72..d624e41e 100644 --- a/test/exception_to_result_test.cpp +++ b/test/exception_to_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/function_traits_test.cpp b/test/function_traits_test.cpp index 447f0c48..d7fa9ea2 100644 --- a/test/function_traits_test.cpp +++ b/test/function_traits_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -18,7 +17,7 @@ void check_traits( F ) { using namespace leaf::detail; using leaf::leaf_detail_mp11::mp_list; - static_assert(function_traits::arity==4,"arity"); + static_assert(function_traits::arity == 4,"arity"); static_assert(std::is_same,double>::value,"return_type"); static_assert(std::is_same,int>::value,"arg<0>"); static_assert(std::is_same,float>::value,"arg<1>"); @@ -44,6 +43,6 @@ int main() { return 42; } ); - static_assert(leaf::detail::function_traits::arity==-1, "int arity"); + static_assert(leaf::detail::function_traits::arity == -1, "int arity"); return 0; } diff --git a/test/github_issue53_test.cpp b/test/github_issue53_test.cpp index 1ab25cb6..acc92325 100644 --- a/test/github_issue53_test.cpp +++ b/test/github_issue53_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/github_issue53x_test.cpp b/test/github_issue53x_test.cpp index a5a2ec83..1c361e64 100644 --- a/test/github_issue53x_test.cpp +++ b/test/github_issue53x_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/handle_all_other_result_test.cpp b/test/handle_all_other_result_test.cpp index f893ede5..164813e7 100644 --- a/test/handle_all_other_result_test.cpp +++ b/test/handle_all_other_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/handle_all_test.cpp b/test/handle_all_test.cpp index ccc41d79..2a89f010 100644 --- a/test/handle_all_test.cpp +++ b/test/handle_all_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -35,7 +34,7 @@ struct e_std_error_code { std::error_code value; }; template leaf::result f( my_error_code ec ) { - if( ec==my_error_code::ok ) + if( ec == my_error_code::ok ) return R(42); else return leaf::new_error(ec, e_my_error_code{ec}, info<1>{1}, info<2>{2}, info<3>{3}); @@ -98,7 +97,7 @@ int main() }, [&c]( my_error_code ec, info<1> const & x,info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -195,7 +194,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -226,7 +225,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -257,7 +256,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -288,7 +287,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -302,7 +301,7 @@ int main() BOOST_TEST_EQ(c, 2); } - ////////////////////////////////////// + //////////////////////////////////////// // int, try_handle_all (success) { @@ -329,7 +328,7 @@ int main() }, []( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -411,7 +410,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -437,7 +436,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -463,7 +462,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -489,7 +488,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -501,7 +500,7 @@ int main() BOOST_TEST_EQ(r, 2); } - ////////////////////////////////////// + //////////////////////////////////////// // move_only, try_handle_all (success) { @@ -528,7 +527,7 @@ int main() }, []( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return move_only(1); @@ -610,7 +609,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return move_only(2); @@ -636,7 +635,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return move_only(2); @@ -662,7 +661,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return move_only(2); @@ -688,7 +687,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return move_only(2); diff --git a/test/handle_basic_test.cpp b/test/handle_basic_test.cpp index 99e0e0c8..6423c23d 100644 --- a/test/handle_basic_test.cpp +++ b/test/handle_basic_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -46,7 +45,7 @@ leaf::result compute_answer( int what_to_do ) noexcept case 5: return leaf::new_error(error2_tag{}, error_code::error2); default: - BOOST_LEAF_ASSERT(what_to_do==6); + BOOST_LEAF_ASSERT(what_to_do == 6); return leaf::new_error(error3_tag{}, error_code::error3); } } @@ -172,7 +171,7 @@ int main() BOOST_TEST_EQ(r, 1); } - /////////////////////////// + //////////////////////////////////////// BOOST_TEST_EQ(handle_some_errors(0).value(), 42); BOOST_TEST_EQ(handle_some_errors(1).value(), -2); @@ -196,7 +195,7 @@ int main() BOOST_TEST_EQ(r, 1); } - /////////////////////////// + //////////////////////////////////////// BOOST_TEST_EQ(handle_some_errors_float(0).value(), 42.0f); BOOST_TEST_EQ(handle_some_errors_float(2).value(), -2.0f); @@ -220,7 +219,7 @@ int main() BOOST_TEST_EQ(r, 1); } - /////////////////////////// + //////////////////////////////////////// BOOST_TEST(handle_some_errors_void(0)); BOOST_TEST(handle_some_errors_void(3)); @@ -242,7 +241,7 @@ int main() BOOST_TEST_EQ(r, 1); } - /////////////////////////// + //////////////////////////////////////// #ifndef BOOST_LEAF_NO_EXCEPTIONS { @@ -264,7 +263,7 @@ int main() } #endif - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -295,7 +294,7 @@ int main() BOOST_TEST_EQ(r, 0); } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -331,7 +330,7 @@ int main() BOOST_TEST_EQ(r, 0); } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -363,7 +362,7 @@ int main() BOOST_TEST_EQ(r, 0); } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -395,7 +394,7 @@ int main() BOOST_TEST_EQ(r, 0); } - /////////////////////////// + //////////////////////////////////////// return boost::report_errors(); } diff --git a/test/handle_some_other_result_test.cpp b/test/handle_some_other_result_test.cpp index 73078301..8b37c127 100644 --- a/test/handle_some_other_result_test.cpp +++ b/test/handle_some_other_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/handle_some_test.cpp b/test/handle_some_test.cpp index 4d493a76..ba02e8a4 100644 --- a/test/handle_some_test.cpp +++ b/test/handle_some_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -35,7 +34,7 @@ struct e_std_error_code { std::error_code value; }; template leaf::result f( my_error_code ec ) { - if( ec==my_error_code::ok ) + if( ec == my_error_code::ok ) return R(42); else return leaf::new_error(ec, e_my_error_code{ec}, info<1>{1}, info<2>{2}, info<3>{3}); @@ -89,7 +88,7 @@ int main() }, [&c]( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -164,7 +163,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -191,7 +190,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -218,7 +217,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -245,7 +244,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -279,7 +278,7 @@ int main() }, [&c]( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -397,7 +396,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -435,7 +434,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -473,7 +472,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -511,7 +510,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -540,7 +539,7 @@ int main() }, [&c]( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -658,7 +657,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -696,7 +695,7 @@ int main() }, [&c]( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -734,7 +733,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -772,7 +771,7 @@ int main() }, [&c]( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); BOOST_TEST_EQ(c, 0); @@ -795,7 +794,7 @@ int main() BOOST_TEST_EQ(c, 1); } - ////////////////////////////////////// + //////////////////////////////////////// // int, try_handle_some (success) { @@ -822,7 +821,7 @@ int main() }, []( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -870,7 +869,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -893,7 +892,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -916,7 +915,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -939,7 +938,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -968,7 +967,7 @@ int main() }, []( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -1068,7 +1067,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -1100,7 +1099,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -1132,7 +1131,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -1164,7 +1163,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 2; @@ -1189,7 +1188,7 @@ int main() }, []( my_error_code ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec==my_error_code::error1); + BOOST_TEST(ec == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -1289,7 +1288,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -1321,7 +1320,7 @@ int main() }, []( leaf::match ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched==my_error_code::error1); + BOOST_TEST(ec.matched == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -1353,7 +1352,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -1385,7 +1384,7 @@ int main() }, []( leaf::match_value ec, info<1> const & x, info<2> y ) { - BOOST_TEST(ec.matched.value==my_error_code::error1); + BOOST_TEST(ec.matched.value == my_error_code::error1); BOOST_TEST_EQ(x.value, 1); BOOST_TEST_EQ(y.value, 2); return 1; @@ -1404,7 +1403,7 @@ int main() BOOST_TEST_EQ(r, 1); } - ////////////////////////////////////// + //////////////////////////////////////// // no exception caught, error handled { diff --git a/test/lightweight_test.hpp b/test/lightweight_test.hpp index a65dcb0f..e4445375 100644 --- a/test/lightweight_test.hpp +++ b/test/lightweight_test.hpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/match_member_test.cpp b/test/match_member_test.cpp index 4bd246b4..8ab4e28d 100644 --- a/test/match_member_test.cpp +++ b/test/match_member_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/match_test.cpp b/test/match_test.cpp index bdb75c7d..2c7f0fde 100644 --- a/test/match_test.cpp +++ b/test/match_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/match_value_test.cpp b/test/match_value_test.cpp index 1cb2472e..1ee3d8c1 100644 --- a/test/match_value_test.cpp +++ b/test/match_value_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/multiple_errors_test.cpp b/test/multiple_errors_test.cpp index 1b5968f8..8f36d1bd 100644 --- a/test/multiple_errors_test.cpp +++ b/test/multiple_errors_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_basic_test.cpp b/test/on_error_accumulate_basic_test.cpp index 351e8a79..161855d8 100644 --- a/test/on_error_accumulate_basic_test.cpp +++ b/test/on_error_accumulate_basic_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_error_exception_test.cpp b/test/on_error_accumulate_nested_error_exception_test.cpp index ebde2521..b45c56c8 100644 --- a/test/on_error_accumulate_nested_error_exception_test.cpp +++ b/test/on_error_accumulate_nested_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_error_result_test.cpp b/test/on_error_accumulate_nested_error_result_test.cpp index 7e1f06b4..73bd59ee 100644 --- a/test/on_error_accumulate_nested_error_result_test.cpp +++ b/test/on_error_accumulate_nested_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_new_error_exception_test.cpp b/test/on_error_accumulate_nested_new_error_exception_test.cpp index 8f18a943..c14ba861 100644 --- a/test/on_error_accumulate_nested_new_error_exception_test.cpp +++ b/test/on_error_accumulate_nested_new_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_new_error_result_test.cpp b/test/on_error_accumulate_nested_new_error_result_test.cpp index f425fba3..0f330285 100644 --- a/test/on_error_accumulate_nested_new_error_result_test.cpp +++ b/test/on_error_accumulate_nested_new_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_success_exception_test.cpp b/test/on_error_accumulate_nested_success_exception_test.cpp index 6c9eb6e3..a85f2beb 100644 --- a/test/on_error_accumulate_nested_success_exception_test.cpp +++ b/test/on_error_accumulate_nested_success_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_accumulate_nested_success_result_test.cpp b/test/on_error_accumulate_nested_success_result_test.cpp index a26439f0..544497a7 100644 --- a/test/on_error_accumulate_nested_success_result_test.cpp +++ b/test/on_error_accumulate_nested_success_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_basic_test.cpp b/test/on_error_defer_basic_test.cpp index cd1e2b51..50ee5654 100644 --- a/test/on_error_defer_basic_test.cpp +++ b/test/on_error_defer_basic_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -65,7 +64,7 @@ int main() std::string s = ss.str(); std::cout << s << std::endl; if( BOOST_LEAF_CFG_DIAGNOSTICS ) - BOOST_TEST(s.find("info<42>")!=s.npos); + BOOST_TEST_NE(s.find("info<42>"), s.npos); #endif return 1; }, diff --git a/test/on_error_defer_nested_error_exception_test.cpp b/test/on_error_defer_nested_error_exception_test.cpp index 410413bb..eab9a2bc 100644 --- a/test/on_error_defer_nested_error_exception_test.cpp +++ b/test/on_error_defer_nested_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_nested_error_result_test.cpp b/test/on_error_defer_nested_error_result_test.cpp index 0c2020ab..1abac0e5 100644 --- a/test/on_error_defer_nested_error_result_test.cpp +++ b/test/on_error_defer_nested_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_nested_new_error_exception_test.cpp b/test/on_error_defer_nested_new_error_exception_test.cpp index 41cb1256..45efe6be 100644 --- a/test/on_error_defer_nested_new_error_exception_test.cpp +++ b/test/on_error_defer_nested_new_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_nested_new_error_result_test.cpp b/test/on_error_defer_nested_new_error_result_test.cpp index 737c6a4a..b6f48635 100644 --- a/test/on_error_defer_nested_new_error_result_test.cpp +++ b/test/on_error_defer_nested_new_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_nested_success_exception_test.cpp b/test/on_error_defer_nested_success_exception_test.cpp index 66a165c4..e471dbb1 100644 --- a/test/on_error_defer_nested_success_exception_test.cpp +++ b/test/on_error_defer_nested_success_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_defer_nested_success_result_test.cpp b/test/on_error_defer_nested_success_result_test.cpp index 351b6c88..d5b34294 100644 --- a/test/on_error_defer_nested_success_result_test.cpp +++ b/test/on_error_defer_nested_success_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_basic_test.cpp b/test/on_error_preload_basic_test.cpp index c6cbf423..e700be3a 100644 --- a/test/on_error_preload_basic_test.cpp +++ b/test/on_error_preload_basic_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_exception_test.cpp b/test/on_error_preload_exception_test.cpp index 17431f40..881ee4a7 100644 --- a/test/on_error_preload_exception_test.cpp +++ b/test/on_error_preload_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_error_exception_test.cpp b/test/on_error_preload_nested_error_exception_test.cpp index 6ea98d61..1eb0843a 100644 --- a/test/on_error_preload_nested_error_exception_test.cpp +++ b/test/on_error_preload_nested_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_error_result_test.cpp b/test/on_error_preload_nested_error_result_test.cpp index f301dd71..d5abc3dc 100644 --- a/test/on_error_preload_nested_error_result_test.cpp +++ b/test/on_error_preload_nested_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_new_error_exception_test.cpp b/test/on_error_preload_nested_new_error_exception_test.cpp index a30c1357..a46b5b56 100644 --- a/test/on_error_preload_nested_new_error_exception_test.cpp +++ b/test/on_error_preload_nested_new_error_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_new_error_result_test.cpp b/test/on_error_preload_nested_new_error_result_test.cpp index fa68c1be..ddd0c652 100644 --- a/test/on_error_preload_nested_new_error_result_test.cpp +++ b/test/on_error_preload_nested_new_error_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_success_exception_test.cpp b/test/on_error_preload_nested_success_exception_test.cpp index de5e55e8..103ee86c 100644 --- a/test/on_error_preload_nested_success_exception_test.cpp +++ b/test/on_error_preload_nested_success_exception_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/on_error_preload_nested_success_result_test.cpp b/test/on_error_preload_nested_success_result_test.cpp index 0471e80c..fe73c759 100644 --- a/test/on_error_preload_nested_success_result_test.cpp +++ b/test/on_error_preload_nested_success_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/optional_test.cpp b/test/optional_test.cpp index d2e2ceaa..18614495 100644 --- a/test/optional_test.cpp +++ b/test/optional_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -47,7 +46,7 @@ class my_info ~my_info() { BOOST_TEST(--object_count>=0); - if( value!=-1 ) + if( value != -1 ) BOOST_TEST(--value_count>=0); } }; diff --git a/test/parse_name_test.cpp b/test/parse_name_test.cpp index edd87092..3c786ace 100644 --- a/test/parse_name_test.cpp +++ b/test/parse_name_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/print_test.cpp b/test/print_test.cpp index 17bcbbec..9ddfc4d6 100644 --- a/test/print_test.cpp +++ b/test/print_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/result_bad_result_test.cpp b/test/result_bad_result_test.cpp index 264a11f0..4f464a06 100644 --- a/test/result_bad_result_test.cpp +++ b/test/result_bad_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -71,12 +70,12 @@ int main() #endif { leaf::result r1 = leaf::new_error(e_test{42}); - BOOST_TEST(r1.operator->()==0); + BOOST_TEST(!r1.operator->()); } #if !BOOST_WORKAROUND( BOOST_GCC, < 50000 ) { leaf::result const r1 = leaf::new_error(e_test{42}); - BOOST_TEST(r1.operator->()==0); + BOOST_TEST(!r1.operator->()); } #endif { diff --git a/test/result_implicit_conversion_test.cpp b/test/result_implicit_conversion_test.cpp index f362be45..d89a8344 100644 --- a/test/result_implicit_conversion_test.cpp +++ b/test/result_implicit_conversion_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/result_load_test.cpp b/test/result_load_test.cpp index efe9941f..eea2d2b1 100644 --- a/test/result_load_test.cpp +++ b/test/result_load_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/result_print_test.cpp b/test/result_print_test.cpp index 94a9824b..2f0a0401 100644 --- a/test/result_print_test.cpp +++ b/test/result_print_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/result_ref_test.cpp b/test/result_ref_test.cpp index f6a732e0..ac17cdbd 100644 --- a/test/result_ref_test.cpp +++ b/test/result_ref_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -20,7 +19,7 @@ struct val friend bool operator==( val const & a, val const & b ) { - return a.id==b.id; + return a.id == b.id; } friend std::ostream & operator<<( std::ostream & os, val const & v ) diff --git a/test/result_state_test.cpp b/test/result_state_test.cpp index 52a5f0aa..f323a82c 100644 --- a/test/result_state_test.cpp +++ b/test/result_state_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -61,7 +60,7 @@ struct val friend bool operator==( val const & a, val const & b ) noexcept { - return a.id==b.id; + return a.id == b.id; } friend std::ostream & operator<<( std::ostream & os, val const & v ) noexcept @@ -104,12 +103,12 @@ bool eq_value( leaf::result & r, val v ) leaf::result const & cr = r; val const & cv = v; return - r.value()==v && - cr.value()==cv && - *r.operator->()==v && - *cr.operator->()==cv && - *r==v && - *cr==cv; + r.value() == v && + cr.value() == cv && + *r.operator->() == v && + *cr.operator->() == cv && + *r == v && + *cr == cv; } int main() @@ -374,7 +373,7 @@ int main() // ^^ result ^^ - ///////////////////////////////////////////////////////////// + //////////////////////////////////////// // vv result vv @@ -382,12 +381,12 @@ int main() leaf::result r1; BOOST_TEST(r1); r1.value(); - BOOST_TEST(r1.operator->() != 0); + BOOST_TEST(r1.operator->()); *r1; leaf::result r2 = std::move(r1); BOOST_TEST(r2); r2.value(); - BOOST_TEST(r2.operator->() != 0); + BOOST_TEST(r2.operator->()); *r2; } @@ -395,12 +394,12 @@ int main() leaf::result r1; BOOST_TEST(r1); r1.value(); - BOOST_TEST(r1.operator->() != 0); + BOOST_TEST(r1.operator->()); *r1; leaf::result r2; r2=std::move(r1); BOOST_TEST(r2); r2.value(); - BOOST_TEST(r2.operator->() != 0); + BOOST_TEST(r2.operator->()); *r2; } @@ -412,7 +411,7 @@ int main() auto active_context = activate_context(ctx); leaf::result r1 = leaf::new_error( e_err { } ); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2 = std::move(r1); @@ -428,7 +427,7 @@ int main() leaf::error_id err = leaf::new_error( e_err{ } ); leaf::result r1 = err; BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2 = std::move(r1); @@ -445,7 +444,7 @@ int main() leaf::result r1 = leaf::new_error( e_err { } ); ctx.deactivate(); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2; r2=std::move(r1); @@ -463,7 +462,7 @@ int main() leaf::error_id err = leaf::new_error( e_err{ } ); leaf::result r1 = err; BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2; r2=std::move(r1); @@ -482,7 +481,7 @@ int main() return leaf::new_error(e_err{ }); }); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2 = std::move(r1); @@ -500,7 +499,7 @@ int main() return leaf::result(err); }); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2 = std::move(r1); @@ -518,7 +517,7 @@ int main() return leaf::new_error(e_err{ }); }); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2; r2=std::move(r1); @@ -536,7 +535,7 @@ int main() return leaf::result(err); }); BOOST_TEST(!r1); - BOOST_TEST(r1.operator->() == 0); + BOOST_TEST(!r1.operator->()); BOOST_TEST_EQ(err::count, 1); leaf::error_id r1e = r1.error(); leaf::result r2; r2=std::move(r1); diff --git a/test/tls_array_alloc_test1.cpp b/test/tls_array_alloc_test1.cpp index c32b6d5c..ebf4150a 100644 --- a/test/tls_array_alloc_test1.cpp +++ b/test/tls_array_alloc_test1.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/tls_array_alloc_test2.cpp b/test/tls_array_alloc_test2.cpp index 205bf5dc..a31c2ef4 100644 --- a/test/tls_array_alloc_test2.cpp +++ b/test/tls_array_alloc_test2.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/tls_array_alloc_test3.cpp b/test/tls_array_alloc_test3.cpp index 3c028a3a..0f021874 100644 --- a/test/tls_array_alloc_test3.cpp +++ b/test/tls_array_alloc_test3.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/tls_array_test.cpp b/test/tls_array_test.cpp index a44a32d5..548e700d 100644 --- a/test/tls_array_test.cpp +++ b/test/tls_array_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/to_variant_test.cpp b/test/to_variant_test.cpp index de2a810c..81873094 100644 --- a/test/to_variant_test.cpp +++ b/test/to_variant_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -39,8 +38,8 @@ int main() { return 42; } ); - BOOST_TEST(v.index() == 0); - BOOST_TEST(std::get<0>(v) == 42); + BOOST_TEST_EQ(v.index(), 0); + BOOST_TEST_EQ(std::get<0>(v), 42); } { diff --git a/test/try_capture_all_test.cpp b/test/try_capture_all_test.cpp index 377361c6..c3254c95 100644 --- a/test/try_capture_all_test.cpp +++ b/test/try_capture_all_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/try_catch_error_id_test.cpp b/test/try_catch_error_id_test.cpp index de5f83ab..1c14305b 100644 --- a/test/try_catch_error_id_test.cpp +++ b/test/try_catch_error_id_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -42,7 +41,7 @@ int main() }, []( my_error const &, leaf::catch_ id ) { - BOOST_TEST(dynamic_cast(&id.matched)!=0 && dynamic_cast(&id.matched)->value()==5); + BOOST_TEST(dynamic_cast(&id.matched) != 0 && dynamic_cast(&id.matched)->value() == 5); return 1; }, [] diff --git a/test/try_catch_system_error_test.cpp b/test/try_catch_system_error_test.cpp index 80d70f1e..012bffb4 100644 --- a/test/try_catch_system_error_test.cpp +++ b/test/try_catch_system_error_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/try_catch_test.cpp b/test/try_catch_test.cpp index f1277c0e..a31f9ca7 100644 --- a/test/try_catch_test.cpp +++ b/test/try_catch_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -179,7 +178,7 @@ int main() BOOST_TEST_EQ(c, 2); } - ////////////////////////////////////// + //////////////////////////////////////// // void, handle_some (failure, initially not matched), match_enum (single enum value) { @@ -311,7 +310,7 @@ int main() BOOST_TEST_EQ(c, 1); } - ////////////////////////////////////// + //////////////////////////////////////// // int, try_catch (success) { @@ -375,7 +374,7 @@ int main() BOOST_TEST_EQ(r, 2); } - ////////////////////////////////////// + //////////////////////////////////////// // int, handle_some (failure, matched), match_enum (single enum value) { @@ -537,7 +536,7 @@ int main() BOOST_TEST_EQ(r, 1); } - ////////////////////////////////////// + //////////////////////////////////////// // match<> with exceptions { @@ -609,7 +608,7 @@ int main() BOOST_TEST_EQ(r, 2); } - ////////////////////////////////////// + //////////////////////////////////////// return boost::report_errors(); } diff --git a/test/try_exception_and_result_test.cpp b/test/try_exception_and_result_test.cpp index e128e4cf..29333114 100644 --- a/test/try_exception_and_result_test.cpp +++ b/test/try_exception_and_result_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) @@ -104,7 +103,7 @@ int main() BOOST_TEST_EQ(r.value(), 1); } - /////////////////////////// + //////////////////////////////////////// { auto error_handlers = std::make_tuple( @@ -160,7 +159,7 @@ int main() } } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -226,7 +225,7 @@ int main() BOOST_TEST_EQ(r, 1); } - /////////////////////////// + //////////////////////////////////////// { auto error_handlers = std::make_tuple( @@ -282,7 +281,7 @@ int main() } } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -352,7 +351,7 @@ int main() BOOST_TEST_EQ(r, 4); } - /////////////////////////// + //////////////////////////////////////// { auto error_handlers = std::make_tuple( @@ -427,7 +426,7 @@ int main() BOOST_TEST_EQ(r, 4); } - /////////////////////////// + //////////////////////////////////////// { int r = leaf::try_handle_all( @@ -498,7 +497,7 @@ int main() BOOST_TEST_EQ(r, 5); } - /////////////////////////// + //////////////////////////////////////// { auto error_handlers = std::make_tuple( @@ -573,7 +572,7 @@ int main() BOOST_TEST_EQ(r, 5); } - ////////////////////////////////////// + //////////////////////////////////////// // match_value<> with exceptions, try_handle_some { @@ -635,7 +634,7 @@ int main() BOOST_TEST(!r); } - ////////////////////////////////////// + //////////////////////////////////////// // match_value<> with exceptions, try_handle_all { diff --git a/test/visibility_test.cpp b/test/visibility_test.cpp index 6a8ea6ea..44378ed7 100644 --- a/test/visibility_test.cpp +++ b/test/visibility_test.cpp @@ -1,5 +1,4 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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) diff --git a/test/visibility_test_lib.cpp b/test/visibility_test_lib.cpp index 0611785a..dd90bacc 100644 --- a/test/visibility_test_lib.cpp +++ b/test/visibility_test_lib.cpp @@ -1,12 +1,16 @@ // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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 "visibility_test_lib.hpp" -#include -#include -#include + +#ifdef BOOST_LEAF_TEST_SINGLE_HEADER +# include "leaf.hpp" +#else +# include +# include +# include +#endif namespace leaf = boost::leaf; diff --git a/test/visibility_test_lib.hpp b/test/visibility_test_lib.hpp index 7c19200d..a314d6be 100644 --- a/test/visibility_test_lib.hpp +++ b/test/visibility_test_lib.hpp @@ -2,7 +2,6 @@ #define VISIBILITY_TEST_LIB_HPP_INCLUDED // Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc. - // 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)