Ticket #4443: bounded_vector_constructors.patch

File bounded_vector_constructors.patch, 654 bytes (added by Jesse Perla <jesseperla@…>, 12 years ago)
  • vector.hpp

     
    814814        bounded_vector ():
    815815            vector_type (N) {}
    816816        BOOST_UBLAS_INLINE
    817         bounded_vector (size_type size):
     817        explicit bounded_vector (size_type size):
    818818            vector_type (size) {}
     819        bounded_vector (size_type size, const value_type &value):
     820                        vector_type (size)
     821                        {std::fill(begin(), end(), value);} //Fills with the value
    819822        BOOST_UBLAS_INLINE
    820823        bounded_vector (const bounded_vector &v):
    821824            vector_type (v) {}