Skip to content

Commit eca4ce1

Browse files
special case no_init Vector ctor
1 parent 752c2cf commit eca4ce1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inst/include/Rcpp/vector/Vector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class Vector :
7575
template <typename U>
7676
explicit Vector( const U& obj) ;
7777

78+
explicit Vector( const no_init& obj) {
79+
Storage::set__( Rf_allocVector( RTYPE, obj.get() ) ) ;
80+
}
81+
7882
Vector( const int& size, const stored_type& u ) {
7983
RCPP_DEBUG_2( "Vector<%d>( const int& size = %d, const stored_type& u )", RTYPE, size)
8084
Storage::set__( Rf_allocVector( RTYPE, size) ) ;

0 commit comments

Comments
 (0)