mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12: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;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special stuff
|
// CTAD adaptor for init (see init description), accepts template not type
|
||||||
template <template <class...> typename CTAD, typename... Args>
|
template <template <class X, class...> typename Template, typename... Args>
|
||||||
auto init(Args&&... args) noexcept
|
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)...);
|
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>
|
template <typename T>
|
||||||
T* get() const noexcept
|
T* get() const noexcept
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue