We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a17ce9b commit fc0c03fCopy full SHA for fc0c03f
cucumber_cpp/library/Body.hpp
@@ -2,6 +2,7 @@
2
#define CUCUMBER_CPP_BODY_HPP
3
4
#include <any>
5
+#include <concepts>
6
#include <string>
7
#include <variant>
8
#include <vector>
@@ -15,7 +16,14 @@ namespace cucumber_cpp::library
15
16
virtual void Execute(const std::variant<std::vector<std::string>, std::vector<std::any>>& args = {}) = 0;
17
};
18
- template<class T>
19
+ template<typename T>
20
+ concept HasSetUpTearDown =
21
+ requires(T t) {
22
+ { t.SetUp() } -> std::convertible_to<void>;
23
+ { t.TearDown() } -> std::convertible_to<void>;
24
+ };
25
+
26
+ template<HasSetUpTearDown T>
27
struct SetUpTearDownWrapper
28
{
29
explicit SetUpTearDownWrapper(T& t)
0 commit comments