Commit 68bb9a12 authored by Ronan's avatar Ronan

feat(MainDb): exec on SafeTransaction is now constexpr

parent cefa3cb8
......@@ -120,14 +120,16 @@ public:
}
private:
// Exec function with no return type.
template<typename T>
typename std::enable_if<std::is_same<T, void>::value, bool>::type exec () const {
constexpr typename std::enable_if<std::is_same<T, void>::value, bool>::type exec () const {
mFunction();
return true;
}
// Exec function with return type.
template<typename T>
typename std::enable_if<!std::is_same<T, void>::value, T>::type exec () const {
constexpr typename std::enable_if<!std::is_same<T, void>::value, T>::type exec () const {
return mFunction();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment