Skip to content

Commit

Permalink
Merge branch 'refs/heads/twarug/ref' into twarug/math
Browse files Browse the repository at this point in the history
  • Loading branch information
Twarug committed Apr 19, 2024
2 parents 93362b5 + 1b44bb8 commit b8a6b62
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/Ref.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <memory>

namespace arch {

template<typename T>
using Ref = std::shared_ptr<T>;

template<typename T, typename... Args>
constexpr Ref<T> createRef(Args&&... args) {
return std::make_shared<T>(std::forward<Args>(args)...);
}

} // namespace arch

0 comments on commit b8a6b62

Please sign in to comment.