Mark A. Gibbs
Mark A. Gibbs
One of the examples is: ``` cpp /// \effects Exchanges values stored in two locations. /// \requires Type `T` shall be `MoveConstructible` and `MoveAssignable`. template void swap(T &a, T &b)...
The [sample output](https://gist.github.com/foonathan/14e163b76804b6775d780eabcbaa6a51) contains this class: ``` cpp template class direct_storage { public: direct_storage() = default; direct_storage(direct_storage && other) noexcept; direct_storage & operator=(direct_storage && other) noexcept; allocator_type & get_allocator() noexcept;...
Clang 10+ generates a warning in C++20 mode, even with no warnings explicitly enabled. ``` $ clang++ -std=c++20 -I/mnt/saturn/source/boost_1_72_0 -c -o main.o main.cpp In file included from main.cpp:6: In file...
The template test API lets me do this: ```cpp using test_types = std::tuple; BOOST_AUTO_TEST_CASE_TEMPLATE(test_1, T, test_types) { // tests for `T` } // 3 tests generated ``` This is great....
I can generate tests from data using the data-driven API: ```cpp constinit auto test_data = std::array{-1, 0, 1, 99}; BOOST_DATA_TEST_CASE(test_1, test_data) { // tests using `sample` } // 4 tests...
I added two new samples in the "input" category, both showing how to read the entire contents of an input stream into a variable in one shot. - `read-text-stream` shows...