mirror of https://github.com/davisking/dlib.git
Made vector_to_matrix() work for std::vector objects that have non-default
allocators. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402224
This commit is contained in:
parent
db3f3c17ae
commit
d617349959
|
@ -1338,13 +1338,14 @@ namespace dlib
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
template <
|
template <
|
||||||
typename value_type
|
typename value_type,
|
||||||
|
typename alloc
|
||||||
>
|
>
|
||||||
const matrix_exp<matrix_std_vector_exp<std::vector<value_type> > > vector_to_matrix (
|
const matrix_exp<matrix_std_vector_exp<std::vector<value_type,alloc> > > vector_to_matrix (
|
||||||
const std::vector<value_type>& vector
|
const std::vector<value_type,alloc>& vector
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef matrix_std_vector_exp<std::vector<value_type> > exp;
|
typedef matrix_std_vector_exp<std::vector<value_type,alloc> > exp;
|
||||||
return matrix_exp<exp>(exp(vector));
|
return matrix_exp<exp>(exp(vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue