mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Fix g_fxo->init internal logic for CTAD (use () not {})
Also improve comments to the functions.
This commit is contained in:
parent
9c9c2eb2c9
commit
136d769895
1 changed files with 5 additions and 4 deletions
|
@ -165,15 +165,16 @@ namespace stx
|
|||
return obj;
|
||||
}
|
||||
|
||||
// Special stuff
|
||||
template <template <class...> typename CTAD, typename... Args>
|
||||
// CTAD adaptor for init (see init description), accepts template not type
|
||||
template <template <class X, class...> typename Template, typename... Args>
|
||||
auto init(Args&&... args) noexcept
|
||||
{
|
||||
using T = decltype(CTAD{std::forward<Args>(args)...});
|
||||
// Deduce the type from given template and its arguments
|
||||
using T = decltype(Template(std::forward<Args>(args)...));
|
||||
return init<T>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
// Obtain object pointer (the only thread safe function)
|
||||
// Obtain object pointer (thread safe just against other get calls)
|
||||
template <typename T>
|
||||
T* get() const noexcept
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue