diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 37adb063..8c43e9ad 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2926,7 +2926,7 @@ namespace boost { namespace numeric { namespace ublas { matrix_expression (), size1_ (0), size2_ (0), value_ () {} BOOST_UBLAS_INLINE - scalar_matrix (size_type size1, size_type size2, const value_type &value): + scalar_matrix (size_type size1, size_type size2, const value_type &value = value_type(1)): matrix_expression (), size1_ (size1), size2_ (size2), value_ (value) {} BOOST_UBLAS_INLINE diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index b70d2447..23009ac2 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -594,7 +594,7 @@ namespace boost { namespace numeric { namespace ublas { vector_expression (), size_ (0), index_ (0) {} BOOST_UBLAS_INLINE - unit_vector (size_type size, size_type index): + explicit unit_vector (size_type size, size_type index = 0): vector_expression (), size_ (size), index_ (index) {} BOOST_UBLAS_INLINE @@ -1062,7 +1062,7 @@ namespace boost { namespace numeric { namespace ublas { vector_expression (), size_ (0), value_ () {} BOOST_UBLAS_INLINE - scalar_vector (size_type size, const value_type &value): + explicit scalar_vector (size_type size, const value_type &value = value_type(1)): vector_expression (), size_ (size), value_ (value) {} BOOST_UBLAS_INLINE