diff --git a/src/adiar/bdd.h b/src/adiar/bdd.h index dc78f3f35..a078c3b1f 100644 --- a/src/adiar/bdd.h +++ b/src/adiar/bdd.h @@ -2077,7 +2077,8 @@ namespace adiar /// \returns The output iterator at its final state. ////////////////////////////////////////////////////////////////////////////////////////////////// template >> && !is_convertible>> + typename = enable_if>> + && !is_convertible>> OutputIt bdd_satmin(const bdd& f, OutputIt iter) { @@ -2174,7 +2175,8 @@ namespace adiar /// \returns The output iterator at its final state. ////////////////////////////////////////////////////////////////////////////// template >> && !is_convertible>> + typename = enable_if>> + && !is_convertible>> OutputIt bdd_satmax(const bdd& f, OutputIt iter) { diff --git a/src/adiar/deprecated.h b/src/adiar/deprecated.h index 765e70b1e..43fa10eb5 100644 --- a/src/adiar/deprecated.h +++ b/src/adiar/deprecated.h @@ -22,7 +22,8 @@ namespace adiar /// \brief The lexicographically smallest x such that f(x) is true. ////////////////////////////////////////////////////////////////////////////////////////////////// template >> - [[deprecated("Use an output iterator (Did you mean to provide values? Use a constant iterator, for now)")]] + [[deprecated( + "Use an output iterator (Did you mean to provide values? Use a constant iterator, for now)")]] ForwardIt bdd_satmin(const bdd& f, ForwardIt begin, ForwardIt end) { @@ -34,7 +35,8 @@ namespace adiar /// \brief The lexicographically largest x such that f(x) is true. ////////////////////////////////////////////////////////////////////////////// template >> - [[deprecated("Use an output iterator (Did you mean to provide values? Use a constant iterator, for now)")]] + [[deprecated( + "Use an output iterator (Did you mean to provide values? Use a constant iterator, for now)")]] ForwardIt bdd_satmax(const bdd& f, ForwardIt begin, ForwardIt end) { diff --git a/src/adiar/functional.h b/src/adiar/functional.h index 538a078e4..200279ac7 100644 --- a/src/adiar/functional.h +++ b/src/adiar/functional.h @@ -66,9 +66,7 @@ namespace adiar inline consumer make_consumer(OutputIt& iter) { - return [&iter](const ValueType& x) { - *(iter++) = x; - }; + return [&iter](const ValueType& x) { *(iter++) = x; }; } ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -78,9 +76,7 @@ namespace adiar inline consumer make_consumer(OutputIt&& iter) { - return [_iter = std::move(iter)](const ValueType& x) mutable { - *(_iter++) = x; - }; + return [_iter = std::move(iter)](const ValueType& x) mutable { *(_iter++) = x; }; } ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -92,9 +88,7 @@ namespace adiar { using value_type = typename OutputIt::container_type::value_type; - return [&iter](const value_type& x) { - *(iter++) = x; - }; + return [&iter](const value_type& x) { *(iter++) = x; }; } ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -106,9 +100,7 @@ namespace adiar { using value_type = typename OutputIt::container_type::value_type; - return [_iter = std::move(iter)](const value_type& x) mutable { - *(_iter++) = x; - }; + return [_iter = std::move(iter)](const value_type& x) mutable { *(_iter++) = x; }; } ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/test/adiar/bdd/test_evaluate.cpp b/test/adiar/bdd/test_evaluate.cpp index 74bd02f6d..fd4fb1cbe 100644 --- a/test/adiar/bdd/test_evaluate.cpp +++ b/test/adiar/bdd/test_evaluate.cpp @@ -1,5 +1,4 @@ #include "../../test.h" - #include go_bandit([]() { @@ -2023,7 +2022,7 @@ go_bandit([]() { }); describe("bdd_satmin(const bdd&, OutputIter)", [&]() { - using pair_type = pair; + using pair_type = pair; using output_vector = std::vector; it("outputs [] for false terminal", [&]() { @@ -2034,9 +2033,9 @@ go_bandit([]() { AssertThat(out.size(), Is().EqualTo(0u)); // Check state of 'iter' - iter = {21, true}; + iter = { 21, true }; AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{21, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 21, true })); }); it("outputs [] for true terminal", [&]() { @@ -2047,9 +2046,9 @@ go_bandit([]() { AssertThat(out.size(), Is().EqualTo(0u)); // Check state of 'iter' - iter = {42, false}; + iter = { 42, false }; AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{42, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 42, false })); }); it("outputs [{x0, true}] for [0]", [&]() { @@ -2058,13 +2057,13 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); // Check state of 'iter' - iter = {42, false}; + iter = { 42, false }; AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{42, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 42, false })); }); it("outputs [{x0, false}] for [~0]", [&]() { @@ -2073,13 +2072,13 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); // Check state of 'iter' - iter = {21, true}; + iter = { 21, true }; AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{21, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 21, true })); }); it("outputs [{0, false}, {1, false}, {2, true}, {3, true}] for [1]", [&]() { @@ -2088,16 +2087,16 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{1, false})); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, true})); - AssertThat(out.at(3), Is().EqualTo(pair_type{3, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 1, false })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, true })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 3, true })); // Check state of 'iter' - iter = {42, true}; + iter = { 42, true }; AssertThat(out.size(), Is().EqualTo(5u)); - AssertThat(out.at(3), Is().EqualTo(pair_type{3, true})); - AssertThat(out.at(4), Is().EqualTo(pair_type{42, true})); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 3, true })); + AssertThat(out.at(4), Is().EqualTo(pair_type{ 42, true })); }); it("outputs [{0, false}, {1, false}, {2, false}] for [~1]", [&]() { @@ -2106,15 +2105,15 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{1, false})); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 1, false })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, false })); // Check state of 'iter' - iter = {21, false}; + iter = { 21, false }; AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, false})); - AssertThat(out.at(3), Is().EqualTo(pair_type{21, false})); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, false })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 21, false })); }); it("outputs [{0, false}, {2, false}] for [4]", [&]() { @@ -2123,14 +2122,14 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, false })); // Check state of 'iter' - iter = {8, false}; + iter = { 8, false }; AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, false})); - AssertThat(out.at(2), Is().EqualTo(pair_type{8, false})); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, false })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 8, false })); }); it("outputs [{0, false}, {2, true}, {3, true}] for [~4]", [&]() { @@ -2139,15 +2138,15 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, true})); - AssertThat(out.at(2), Is().EqualTo(pair_type{3, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, true })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 3, true })); // Check state of 'iter' - iter = {4, false}; + iter = { 4, false }; AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(2), Is().EqualTo(pair_type{3, true})); - AssertThat(out.at(3), Is().EqualTo(pair_type{4, false})); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 3, true })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 4, false })); }); it("outputs [{1, false}, {3, false}] for [4(+1)]", [&]() { @@ -2156,14 +2155,14 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{1, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{3, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 1, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 3, false })); // Check state of 'iter' - iter = {5, false}; + iter = { 5, false }; AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(1), Is().EqualTo(pair_type{3, false})); - AssertThat(out.at(2), Is().EqualTo(pair_type{5, false})); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 3, false })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 5, false })); }); }); @@ -3682,7 +3681,7 @@ go_bandit([]() { }); describe("bdd_satmax(const bdd&, OutputIter)", [&]() { - using pair_type = pair; + using pair_type = pair; using output_vector = std::vector; it("outputs nothing in buffer for false terminal", [&]() { @@ -3693,9 +3692,9 @@ go_bandit([]() { AssertThat(out.size(), Is().EqualTo(0u)); // Check state of 'iter' - iter = {21, true}; + iter = { 21, true }; AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{21, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 21, true })); }); it("outputs nothing in buffer for true terminal", [&]() { @@ -3706,9 +3705,9 @@ go_bandit([]() { AssertThat(out.size(), Is().EqualTo(0u)); // Check state of 'iter' - iter = {42, true}; + iter = { 42, true }; AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{42, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 42, true })); }); it("outputs {x0, true} for [0]", [&]() { @@ -3717,13 +3716,13 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); // Check state of 'iter' - iter = {42, true}; + iter = { 42, true }; AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{42, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 42, true })); }); it("outputs {x0, false} for [~0]", [&]() { @@ -3732,13 +3731,13 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(1u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); // Check state of 'iter' - iter = {8, false}; + iter = { 8, false }; AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, false})); - AssertThat(out.at(1), Is().EqualTo(pair_type{8, false})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, false })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 8, false })); }); it("outputs expected values into buffer for [2]", [&]() { @@ -3747,14 +3746,14 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(2u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, true })); // Check state of 'iter' - iter = {4, false}; + iter = { 4, false }; AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, true})); - AssertThat(out.at(2), Is().EqualTo(pair_type{4, false})); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, true })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 4, false })); }); it("outputs expected values into buffer for [~2]", [&]() { @@ -3763,15 +3762,15 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{2, false})); - AssertThat(out.at(2), Is().EqualTo(pair_type{3, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 2, false })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 3, true })); // Check state of 'iter' - iter = {4, false}; + iter = { 4, false }; AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(2), Is().EqualTo(pair_type{3, true})); - AssertThat(out.at(3), Is().EqualTo(pair_type{4, false})); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 3, true })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 4, false })); }); it("outputs expected values into buffer for [4]", [&]() { @@ -3780,15 +3779,15 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{1, true})); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 1, true })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, true })); // Check state of 'iter' - iter = {3, false}; + iter = { 3, false }; AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, true})); - AssertThat(out.at(3), Is().EqualTo(pair_type{3, false})); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, true })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 3, false })); }); it("outputs expected values into buffer for [~4]", [&]() { @@ -3797,16 +3796,16 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{0, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{1, true})); - AssertThat(out.at(2), Is().EqualTo(pair_type{2, false})); - AssertThat(out.at(3), Is().EqualTo(pair_type{3, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 0, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 1, true })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 2, false })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 3, true })); // Check state of 'iter' - iter = {4, false}; + iter = { 4, false }; AssertThat(out.size(), Is().EqualTo(5u)); - AssertThat(out.at(3), Is().EqualTo(pair_type{3, true})); - AssertThat(out.at(4), Is().EqualTo(pair_type{4, false})); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 3, true })); + AssertThat(out.at(4), Is().EqualTo(pair_type{ 4, false })); }); it("outputs expected values into buffer for [4(+2)]", [&]() { @@ -3815,15 +3814,15 @@ go_bandit([]() { // Check state of 'out' AssertThat(out.size(), Is().EqualTo(3u)); - AssertThat(out.at(0), Is().EqualTo(pair_type{2, true})); - AssertThat(out.at(1), Is().EqualTo(pair_type{3, true})); - AssertThat(out.at(2), Is().EqualTo(pair_type{4, true})); + AssertThat(out.at(0), Is().EqualTo(pair_type{ 2, true })); + AssertThat(out.at(1), Is().EqualTo(pair_type{ 3, true })); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 4, true })); // Check state of 'iter' - iter = {5, true}; + iter = { 5, true }; AssertThat(out.size(), Is().EqualTo(4u)); - AssertThat(out.at(2), Is().EqualTo(pair_type{4, true})); - AssertThat(out.at(3), Is().EqualTo(pair_type{5, true})); + AssertThat(out.at(2), Is().EqualTo(pair_type{ 4, true })); + AssertThat(out.at(3), Is().EqualTo(pair_type{ 5, true })); }); }); } // bdd_satmin, bdd_satmax diff --git a/test/adiar/internal/test_dd_func.cpp b/test/adiar/internal/test_dd_func.cpp index 99b0c294a..072a1b790 100644 --- a/test/adiar/internal/test_dd_func.cpp +++ b/test/adiar/internal/test_dd_func.cpp @@ -1,9 +1,8 @@ #include "../../test.h" +#include #include -#include - go_bandit([]() { describe("adiar/internal/dd_func.h", []() { const ptr_uint64 false_ptr = ptr_uint64(false); diff --git a/test/adiar/test_functional.cpp b/test/adiar/test_functional.cpp index 82194f851..bbdbb2cf2 100644 --- a/test/adiar/test_functional.cpp +++ b/test/adiar/test_functional.cpp @@ -1,5 +1,4 @@ #include "../test.h" - #include #include #include diff --git a/test/adiar/zdd/test_elem.cpp b/test/adiar/zdd/test_elem.cpp index 373ccae82..2a02dff9c 100644 --- a/test/adiar/zdd/test_elem.cpp +++ b/test/adiar/zdd/test_elem.cpp @@ -1,5 +1,4 @@ #include "../../test.h" - #include go_bandit([]() {