Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-13 11:49:59 +0300
committerJacques Lucke <jacques@blender.org>2020-07-13 11:49:59 +0300
commit644a915b1b096be816ddc50050a70d90a2787191 (patch)
treeae4623b525cd06a1218819da2dce4257dc48907d /source/blender/blenlib/BLI_span.hh
parent0718c6fae002a37b7448bf4b5841d08de114050e (diff)
BLI: don't allow mutable span of initializer list
Diffstat (limited to 'source/blender/blenlib/BLI_span.hh')
-rw-r--r--source/blender/blenlib/BLI_span.hh15
1 files changed, 0 insertions, 15 deletions
diff --git a/source/blender/blenlib/BLI_span.hh b/source/blender/blenlib/BLI_span.hh
index 5c841787520..57ef9ce9eb6 100644
--- a/source/blender/blenlib/BLI_span.hh
+++ b/source/blender/blenlib/BLI_span.hh
@@ -440,21 +440,6 @@ template<typename T> class MutableSpan {
{
}
- /**
- * Reference an initializer_list. Note that the data in the initializer_list is only valid until
- * the expression containing it is fully computed.
- *
- * Do:
- * call_function_with_array({1, 2, 3, 4});
- *
- * Don't:
- * MutableSpan<int> span = {1, 2, 3, 4};
- * call_function_with_array(span);
- */
- MutableSpan(std::initializer_list<T> &list) : MutableSpan(list.begin(), list.size())
- {
- }
-
MutableSpan(std::vector<T> &vector) : MutableSpan(vector.data(), vector.size())
{
}