Skip to content

Commit 030b615

Browse files
author
thirdwing
committed
fixed
1 parent a42fd47 commit 030b615

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

inst/include/Rcpp/vector/Vector.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ class Vector :
9191
fill( u ) ;
9292
}
9393

94+
template<>
95+
Vector( const int& size, const stored_type& u) {
96+
RCPP_DEBUG_2( "Vector<%d>( const int& size = %d, const stored_type& u )", RTYPE, size)
97+
Storage::set__( Rf_allocVector( RTYPE, size) ) ;
98+
fill( u ) ;
99+
}
100+
94101
// constructor for CharacterVector()
95102
Vector( const std::string& st ){
96103
RCPP_DEBUG_2( "Vector<%d>( const std::string& = %s )", RTYPE, st.c_str() )

0 commit comments

Comments
 (0)