Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
91ef0b95
Commit
91ef0b95
authored
Aug 29, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9507 from delftrobotics-forks:restrict-initializer-list-constructor
parents
964dda2e
3571e8f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+6
-1
mat.inl.hpp
modules/core/include/opencv2/core/mat.inl.hpp
+1
-1
No files found.
modules/core/include/opencv2/core/mat.hpp
View file @
91ef0b95
...
...
@@ -53,6 +53,10 @@
#include "opencv2/core/bufferpool.hpp"
#ifdef CV_CXX11
#include <type_traits>
#endif
namespace
cv
{
...
...
@@ -988,7 +992,8 @@ public:
#ifdef CV_CXX11
/** @overload
*/
template
<
typename
_Tp
>
explicit
Mat
(
const
std
::
initializer_list
<
_Tp
>
list
);
template
<
typename
_Tp
,
typename
=
typename
std
::
enable_if
<
std
::
is_arithmetic
<
_Tp
>::
value
>::
type
>
explicit
Mat
(
const
std
::
initializer_list
<
_Tp
>
list
);
#endif
#ifdef CV_CXX_STD_ARRAY
...
...
modules/core/include/opencv2/core/mat.inl.hpp
View file @
91ef0b95
...
...
@@ -575,7 +575,7 @@ Mat::Mat(const std::vector<_Tp>& vec, bool copyData)
}
#ifdef CV_CXX11
template
<
typename
_Tp
>
inline
template
<
typename
_Tp
,
typename
>
inline
Mat
::
Mat
(
const
std
::
initializer_list
<
_Tp
>
list
)
:
flags
(
MAGIC_VAL
|
DataType
<
_Tp
>::
type
|
CV_MAT_CONT_FLAG
),
dims
(
2
),
rows
((
int
)
list
.
size
()),
cols
(
1
),
data
(
0
),
datastart
(
0
),
dataend
(
0
),
datalimit
(
0
),
allocator
(
0
),
u
(
0
),
size
(
&
rows
),
step
(
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment