Skip to content
Snippets Groups Projects
Commit e5df4e0d authored by Paul Gessinger's avatar Paul Gessinger
Browse files

format fix

parent 3ee13535
No related branches found
No related tags found
1 merge request!797Workaround for is_invokable problem
Pipeline #1506916 passed
...@@ -363,8 +363,7 @@ struct MicroBenchmarkIter { ...@@ -363,8 +363,7 @@ struct MicroBenchmarkIter {
constexpr static bool is_callable = constexpr static bool is_callable =
concept ::exists<call_with_input_t, Callable, Input>; concept ::exists<call_with_input_t, Callable, Input>;
static inline void iter(const Callable& iteration, const Input* input) { static inline void iter(const Callable& iteration, const Input* input) {
static_assert(is_callable, static_assert(is_callable, "Gave callable that is not callable with input");
"Gave callable that is not callable with input");
if constexpr (is_callable) { if constexpr (is_callable) {
using Result = std::invoke_result_t<Callable, const Input&>; using Result = std::invoke_result_t<Callable, const Input&>;
MicroBenchmarkIterImpl<Callable, Input, Result>::iter(iteration, *input); MicroBenchmarkIterImpl<Callable, Input, Result>::iter(iteration, *input);
...@@ -380,7 +379,8 @@ struct MicroBenchmarkIter<Callable, void> { ...@@ -380,7 +379,8 @@ struct MicroBenchmarkIter<Callable, void> {
concept ::exists<call_without_input_t, Callable>; concept ::exists<call_without_input_t, Callable>;
static inline void iter(const Callable& iteration, const void* = nullptr) { static inline void iter(const Callable& iteration, const void* = nullptr) {
static_assert(is_callable, "Gave callable that is not callable without input"); static_assert(is_callable,
"Gave callable that is not callable without input");
if constexpr (is_callable) { if constexpr (is_callable) {
using Result = std::invoke_result_t<Callable>; using Result = std::invoke_result_t<Callable>;
MicroBenchmarkIterImpl<Callable, void, Result>::iter(iteration); MicroBenchmarkIterImpl<Callable, void, Result>::iter(iteration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment