Skip to content

Commit

Permalink
Noexcept lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Sep 7, 2024
1 parent dbfb575 commit 796d410
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/momo/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ class FastMovableFunctor

template<typename... Args>
decltype(auto) operator()(Args&&... args) &&
noexcept(noexcept(std::forward<BaseFunctor>(mBaseFunctor)(std::forward<Args>(args)...)))
{
return std::forward<BaseFunctor>(mBaseFunctor)(std::forward<Args>(args)...);
}
Expand Down Expand Up @@ -390,6 +391,7 @@ class FastCopyableFunctor

template<typename... Args>
decltype(auto) operator()(Args&&... args) const
noexcept(noexcept(mBaseFunctor(std::forward<Args>(args)...)))
{
return mBaseFunctor(std::forward<Args>(args)...);
}
Expand Down

0 comments on commit 796d410

Please sign in to comment.