summaryrefslogtreecommitdiff
path: root/compiler/linker/linker_patch.h
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2024-04-12 02:43:20 -0700
committer Ryan Prichard <rprichard@google.com> 2024-04-15 23:46:28 +0000
commit03ffba55522e3e58e9ed7b4ef1e73ded53eef0fd (patch)
tree514d97bc39230745b3b23c58bb4cc822d460f8cf /compiler/linker/linker_patch.h
parentf257588ba1da87d5591fbc2356bd7392ef9299ea (diff)
CompilationResult: remove private default ctor
The private default constructor was added to force users to call one of CompilationResult's static member functions to construct a CompilationResult. However, it was possible to bypass this restriction using aggregate initialization: CompilationResult do_compile(...) { ... CompilationResult result; // ill-formed, calls private ctor CompilationResult result {}; // OK, uses aggregate initialization CompilationResult result { .elapsed_time_ms = 42 }; // also OK ... } In C++20, the user-declared private default constructor now prevents aggregate initialization, which closes the loophole. See https://wg21.link/p1008r1. Remove the private constructor so that CompilationResult's members can still use the elegant aggregate syntax themselves. Bug: 311052584 Test: remove cpp_std override and build Android Test: atest art_standalone_odrefresh_tests Change-Id: I3ecb8bec5fb69d453d82fff7235caf417c9f1a8c
Diffstat (limited to 'compiler/linker/linker_patch.h')
0 files changed, 0 insertions, 0 deletions