Skip to content

Commit

Permalink
util: update function dtors, update gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
SciresM committed Mar 22, 2022
1 parent 9911c44 commit 9866285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ dkms.conf

**/out
**/build
**/lib
**/build_nintendo_nx_arm64
**/build_nintendo_nx_arm64_armv8a
**/build_nintendo_nx_arm
Expand All @@ -102,6 +103,8 @@ dkms.conf
**/build_nintendo_nx_x64
**/build_nintendo_nx_x86

tools/*/

package3

stratosphere/test/
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ namespace ams::util {
F m_f;
public:
constexpr explicit Function(F f) : m_f(std::move(f)) { /* ... */}
constexpr virtual ~Function() override { /* ... */ }

constexpr virtual R operator()(Args... args) const override final {
return m_f(std::forward<Args>(args)...);
Expand All @@ -68,6 +69,7 @@ namespace ams::util {
class Function<R(Args...), F, typename std::enable_if<std::is_class<F>::value && !std::is_final<F>::value>::type> final : public IFunction<R(Args...)>, private F {
public:
constexpr explicit Function(F f) : F(std::move(f)) { /* ... */}
constexpr virtual ~Function() override { /* ... */ }

constexpr virtual R operator()(Args... args) const override final {
return static_cast<const F &>(*this).operator()(std::forward<Args>(args)...);
Expand All @@ -90,7 +92,7 @@ namespace ams::util {
template<typename R, typename... Args>
class IFunction<R(Args...)> {
protected:
constexpr virtual ~IFunction() = default;
constexpr virtual ~IFunction() { /* ... */ };
public:
constexpr virtual R operator()(Args... args) const = 0;

Expand Down

0 comments on commit 9866285

Please sign in to comment.