Commit 95ccc17e authored by Davis King's avatar Davis King

Added implicit conversions of std_vector_c back to std::vector so that

it can be used with functions that expect std::vector objects.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402964
parent db166879
......@@ -50,6 +50,9 @@ namespace dlib
std_vector_c(const std_vector_c<T,Allocator>& x) : impl(x.impl) {}
std_vector_c(const std::vector<T,Allocator>& x) : impl(x) {}
operator const base_type& () const { return impl; }
operator base_type& () { return impl; }
std_vector_c<T,Allocator>& operator=(const std_vector_c<T,Allocator>& x)
{
impl = x.impl;
......
......@@ -91,6 +91,22 @@ namespace dlib
- #*this == x
!*/
operator const std::vector<T,Allocator>& (
) const;
/*!
ensures
- returns a const reference to the normal unchecked std::vector
object contained inside *this
!*/
operator std::vector<T,Allocator>& (
);
/*!
ensures
- returns a non-const reference to the normal unchecked std::vector
object contained inside *this
!*/
std_vector_c<T,Allocator>& operator= (
const std_vector_c<T,Allocator>& x
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment