@@ -31,9 +31,10 @@ namespace Rcpp{
3131 }
3232
3333 template <int RTYPE, template <class > class StoragePolicy >
34- template <typename U>
35- Vector<RTYPE, StoragePolicy>::Vector( const U& obj) {
36- Storage::set__ ( r_cast<RTYPE>( wrap (obj) ) ) ;
34+ template <bool NA, typename VEC>
35+ Vector<RTYPE, StoragePolicy>::Vector( const VectorBase<RTYPE,NA,VEC>& other ) {
36+ RCPP_DEBUG_2 ( " Vector<%d>( const VectorBase<RTYPE,NA,VEC>& ) [VEC = %s]" , RTYPE, DEMANGLE (VEC) )
37+ import_sugar_expression ( other, typename traits::same_type<Vector,VEC>::type () ) ;
3738 }
3839
3940 template <int RTYPE, template <class > class StoragePolicy >
@@ -128,14 +129,6 @@ namespace Rcpp{
128129 RCPP_DEBUG_2 ( " Vector<%d>( InputIterator, InputIterator, Func, int n = %d )" , RTYPE, n )
129130 std::transform ( first, last, begin (), func) ;
130131 }
131-
132-
133- template <int RTYPE, template <class > class StoragePolicy >
134- template <bool NA, typename VEC>
135- Vector<RTYPE, StoragePolicy>::Vector( const VectorBase<RTYPE,NA,VEC>& other ) {
136- RCPP_DEBUG_2 ( " Vector<%d>( const VectorBase<RTYPE,NA,VEC>& ) [VEC = %s]" , RTYPE, DEMANGLE (VEC) )
137- import_sugar_expression ( other, typename traits::same_type<Vector,VEC>::type () ) ;
138- }
139132
140133 template <int RTYPE, template <class > class StoragePolicy >
141134 template <bool NA, typename T>
0 commit comments