Skip to content

Commit 01deea0

Browse files
🔨 string_proxy default operator=
1 parent 0ed6d80 commit 01deea0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

inst/include/Rcpp/vector/string_proxy.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ namespace internal{
4444
string_proxy( VECTOR& v, R_xlen_t index_ ) : parent(&v), index(index_){}
4545

4646
string_proxy( const string_proxy& other ) :
47-
parent(other.parent), index(other.index){} ;
47+
parent(other.parent), index(other.index)
48+
{} ;
4849

4950
/**
5051
* lhs use. Assign the value of the referred element to
@@ -53,6 +54,11 @@ namespace internal{
5354
*
5455
* @param rhs another proxy, possibly from another vector
5556
*/
57+
string_proxy& operator=( const string_proxy<RTYPE, StoragePolicy>& other) {
58+
set( other.get() ) ;
59+
return *this ;
60+
}
61+
5662
template <template <class> class StoragePolicy2>
5763
string_proxy& operator=( const string_proxy<RTYPE, StoragePolicy2>& other) {
5864
set( other.get() ) ;

0 commit comments

Comments
 (0)