diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2026-11-02 22:44:51 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-02 22:44:51 -0600 |
| commit | df4bd441dec5d6f3cff606eea76f183963e97a44 (patch) | |
| tree | e8f4c5c9cfbdc8eb666a6b5ff3b8f4a87cb12939 /Source | |
| parent | e8c42467964da77011f7da93a06f9e0a72ca868f (diff) | |
| parent | d08bddeaabbfba79f76407018ab02bdf68fa2d46 (diff) | |
Merge pull request #14972 from jordan-woyak/paren-init-aggregate
Minor cleanups with "parenthesized initialization of aggregates".
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/TypeUtils.h | 6 | ||||
| -rw-r--r-- | Source/Core/Core/Debugger/BranchWatch.cpp | 8 |
2 files changed, 2 insertions, 12 deletions
diff --git a/Source/Core/Common/TypeUtils.h b/Source/Core/Common/TypeUtils.h index 2e18a411ed..16a40955a3 100644 --- a/Source/Core/Common/TypeUtils.h +++ b/Source/Core/Common/TypeUtils.h @@ -97,13 +97,7 @@ public: T& Construct(Args&&... args) { static_assert(sizeof(ManuallyConstructedValue) == sizeof(T)); - -// TODO: Remove placement-new version when we can require Clang 16. -#if defined(__cpp_aggregate_paren_init) && (__cpp_aggregate_paren_init >= 201902L) return *std::construct_at(&m_value.data, std::forward<Args>(args)...); -#else - return *::new (&m_value.data) T{std::forward<Args>(args)...}; -#endif } void Destroy() { std::destroy_at(&m_value.data); } diff --git a/Source/Core/Core/Debugger/BranchWatch.cpp b/Source/Core/Core/Debugger/BranchWatch.cpp index 5f5084562c..d26150e1f6 100644 --- a/Source/Core/Core/Debugger/BranchWatch.cpp +++ b/Source/Core/Core/Debugger/BranchWatch.cpp @@ -118,9 +118,7 @@ void BranchWatch::Load(const CPUThreadGuard& guard, std::FILE* file) if (snapshot_metadata.is_selected) { - // TODO C++20: Parenthesized initialization of aggregates has bad compiler support. - m_selection.emplace_back(BranchWatchSelectionValueType{&*kv_iter, is_virtual, condition, - snapshot_metadata.inspection}); + m_selection.emplace_back(&*kv_iter, is_virtual, condition, snapshot_metadata.inspection); } else if (hits_snapshot != 0) { @@ -144,9 +142,7 @@ void BranchWatch::IsolateHasExecuted(const CPUThreadGuard&) { if (kv.second.hits_snapshot == 0) { - // TODO C++20: Parenthesized initialization of aggregates has bad compiler support. - m_selection.emplace_back( - BranchWatchSelectionValueType{&kv, is_virtual, condition, SelectionInspection{}}); + m_selection.emplace_back(&kv, is_virtual, condition); kv.second.hits_snapshot = kv.second.total_hits; } } |
