@@ -13,7 +13,7 @@ tl::expected<int, string> getInt2(int val) { return val; }
13
13
14
14
tl::expected<int , string> getInt1 () { return getInt2 (5 ).and_then (getInt3); }
15
15
16
- TEST_CASE (" Issue 1" , " [issues.1]" ) { getInt1 (); }
16
+ TEST_CASE (" Issue 1" , " [issues.1]" ) { ( void ) getInt1 (); }
17
17
18
18
tl::expected<int , int > operation1 () { return 42 ; }
19
19
@@ -22,7 +22,7 @@ tl::expected<std::string, int> operation2(int const val) { (void)val; return "Ba
22
22
TEST_CASE (" Issue 17" , " [issues.17]" ) {
23
23
auto const intermediate_result = operation1 ();
24
24
25
- intermediate_result.and_then (operation2);
25
+ ( void ) intermediate_result.and_then (operation2);
26
26
}
27
27
28
28
struct a {};
@@ -61,7 +61,7 @@ tl::expected<int, std::string> error() {
61
61
std::string maperror (std::string s) { return s + " maperror " ; }
62
62
63
63
TEST_CASE (" Issue 30" , " [issues.30]" ) {
64
- error ().map_error (maperror);
64
+ ( void ) error ().map_error (maperror);
65
65
}
66
66
67
67
struct i31 {
@@ -91,7 +91,7 @@ void errorhandling(std::string){}
91
91
TEST_CASE (" Issue 34" , " [issues.34]" ) {
92
92
tl::expected <int , std::string> result = voidWork ()
93
93
.and_then (work2);
94
- result.map_error ([&] (std::string result) {errorhandling (result);});
94
+ ( void ) result.map_error ([&] (std::string result) {errorhandling (result);});
95
95
}
96
96
97
97
struct non_copyable {
@@ -101,7 +101,7 @@ struct non_copyable {
101
101
};
102
102
103
103
TEST_CASE (" Issue 42" , " [issues.42]" ) {
104
- tl::expected<non_copyable,int >{}.map ([](non_copyable) {});
104
+ ( void ) tl::expected<non_copyable,int >{}.map ([](non_copyable) {});
105
105
}
106
106
107
107
TEST_CASE (" Issue 43" , " [issues.43]" ) {
@@ -144,12 +144,12 @@ struct move_tracker {
144
144
145
145
move_tracker () = default ;
146
146
147
- move_tracker (move_tracker const &other) noexcept {} ;
147
+ move_tracker (move_tracker const &other) noexcept ;
148
148
move_tracker (move_tracker &&orig) noexcept
149
149
: moved(orig.moved + 1 ) {}
150
150
151
151
move_tracker &
152
- operator =(move_tracker const &other) noexcept {} ;
152
+ operator =(move_tracker const &other) noexcept ;
153
153
154
154
move_tracker &operator =(move_tracker &&orig) noexcept {
155
155
moved = orig.moved + 1 ;
@@ -221,4 +221,4 @@ TEST_CASE("Issue 145", "[issues.145]") {
221
221
tl::expected<MoveOnly, std::error_code> a{};
222
222
tl::expected<MoveOnly, std::error_code> b = std::move (a);
223
223
a = std::move (b);
224
- }
224
+ }
0 commit comments