Skip to content

Commit f9ce3d8

Browse files
author
Ryan Haining
committed
Adds MoveOnlyLessThanValue for testing
For #89
1 parent fa6ee1a commit f9ce3d8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/helpers.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,22 @@ class LessThanValue {
430430
}
431431
};
432432

433+
class MoveOnlyLessThanValue {
434+
private:
435+
int compare_val;
436+
437+
public:
438+
MoveOnlyLessThanValue(int v) : compare_val(v) {}
439+
440+
MoveOnlyLessThanValue(const MoveOnlyLessThanValue&) = delete;
441+
MoveOnlyLessThanValue& operator=(const MoveOnlyLessThanValue&) = delete;
442+
443+
MoveOnlyLessThanValue(MoveOnlyLessThanValue&&) = default;
444+
MoveOnlyLessThanValue& operator=(MoveOnlyLessThanValue&&) = default;
445+
446+
bool operator()(int i) {
447+
return i < this->compare_val;
448+
}
449+
};
450+
433451
#endif

0 commit comments

Comments
 (0)