AutoPas  3.0.0
Loading...
Searching...
No Matches
StaticBoolSelector.h
Go to the documentation of this file.
1
7#pragma once
8
9namespace autopas::utils {
17template <typename F>
18decltype(auto) withStaticBool(bool theBool, F &&func) {
19 if (theBool) {
20 std::true_type t;
21 return func(t);
22 } else {
23 std::false_type f;
24 return func(f);
25 }
26}
27} // namespace autopas::utils
In this namespace some helper classes and functions can be found used inside of AutoPas.
Definition: namespaces.h:44
decltype(auto) withStaticBool(bool theBool, F &&func)
Function to execute the code passed in the lambda with a static bool.
Definition: StaticBoolSelector.h:18