diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-03-15 09:54:29 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-03-16 06:21:42 +0100 |
commit | 9e18e5c869dbef1f0d9a79e899538ab680e14772 (patch) | |
tree | eb717cfcb6f87e7fd1b89adaf5c1ed83bfebc51a /src/opengl/qopenglwindow.cpp | |
parent | 49e5f2190830e27e25b57fd12d8c3b99a5c82a23 (diff) |
Modernize Tuple Protocol implementations
The existing get<I>() implementations are very cleverâ„¢, if I, as their
inventor in at least the Qt ecosystem, may say so myself. E.g. the ()
around the return value are absolutely required, to ensure we return
by reference, not by value, through decltype(auto).
C++23 gives us forward_like, which doesn't require the parentheses,
because it always returns a reference.
Also replace decay_t with C++20's remove_cvref_t, the latter being
more efficient (performs less work).
Change-Id: Ic9ed0c25e6d6bfbd77d7c85858a8d97fe58be615
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/opengl/qopenglwindow.cpp')
0 files changed, 0 insertions, 0 deletions