aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
authorMarkus Böck <markus.boeck02@gmail.com>2022-08-09 18:07:50 +0200
committerMarkus Böck <markus.boeck02@gmail.com>2022-08-09 18:12:40 +0200
commit205701fd47535a7525789f3291bd686cef1a9773 (patch)
tree3394fc6be9031eca913a557fe97f452da1717a59 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
parentcc71e69459474c19ae7c0ce019abd7a5e12430d6 (diff)
downloadllvm-205701fd47535a7525789f3291bd686cef1a9773.zip
llvm-205701fd47535a7525789f3291bd686cef1a9773.tar.gz
llvm-205701fd47535a7525789f3291bd686cef1a9773.tar.bz2
[llvm][ADT] Allow using structured bindings with `llvm::enumerate`
This patch adds the ability to deconstruct the `value_type` returned by `llvm::enumarate` into index and value of the wrapping range. Main use case is the common occurence of using it during loop iteration. After this patch it'd then be possible to write code such as: ``` for (auto [index, value] : enumerate(container)) { ... } ``` where `index` is the current index and `value` a reference to elements in the given container. Differential Revision: https://reviews.llvm.org/D131486
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions