From d6173499595470954519d3ad2c1e0ab44a6eff54 Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 12 May 2008 23:21:19 +0000 Subject: [PATCH] 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 --- dlib/matrix/matrix_utilities.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlib/matrix/matrix_utilities.h b/dlib/matrix/matrix_utilities.h index f9f6de0f5..e2f3bf632 100644 --- a/dlib/matrix/matrix_utilities.h +++ b/dlib/matrix/matrix_utilities.h @@ -1338,13 +1338,14 @@ namespace dlib // ---------------------------------------------------------------------------------------- template < - typename value_type + typename value_type, + typename alloc > - const matrix_exp > > vector_to_matrix ( - const std::vector& vector + const matrix_exp > > vector_to_matrix ( + const std::vector& vector ) { - typedef matrix_std_vector_exp > exp; + typedef matrix_std_vector_exp > exp; return matrix_exp(exp(vector)); }