From 644a915b1b096be816ddc50050a70d90a2787191 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 13 Jul 2020 10:49:59 +0200 Subject: BLI: don't allow mutable span of initializer list --- source/blender/blenlib/BLI_span.hh | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'source/blender') 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 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 span = {1, 2, 3, 4}; - * call_function_with_array(span); - */ - MutableSpan(std::initializer_list &list) : MutableSpan(list.begin(), list.size()) - { - } - MutableSpan(std::vector &vector) : MutableSpan(vector.data(), vector.size()) { } -- cgit v1.2.3