Skip to content

Commit 69076b1

Browse files
move operator<< and >> so that Language, etc ... benefit from them too
1 parent a5521fd commit 69076b1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

inst/include/Rcpp/DottedPair.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ RCPP_API_CLASS(DottedPair_Impl),
4040

4141
void update(SEXP){}
4242

43-
template <typename T>
44-
friend DottedPair_Impl& operator<<(DottedPair_Impl& os, const T& t){
45-
os.push_back( t ) ;
46-
return os ;
47-
}
48-
49-
template <typename T>
50-
friend DottedPair_Impl& operator>>( const T& t, DottedPair_Impl& s){
51-
s.push_front(t);
52-
return s ;
53-
}
54-
5543
};
5644

5745
typedef DottedPair_Impl<PreserveStorage> DottedPair ;

inst/include/Rcpp/DottedPairImpl.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ namespace Rcpp{
7878
*/
7979
void remove( const size_t& index );
8080

81+
template <typename T>
82+
friend DottedPairImpl& operator<<(DottedPairImpl& os, const T& t){
83+
os.push_back( t ) ;
84+
return os ;
85+
}
86+
87+
template <typename T>
88+
friend DottedPairImpl& operator>>( const T& t, DottedPairImpl& s){
89+
s.push_front(t);
90+
return s ;
91+
}
92+
8193
} ;
8294

8395
}

0 commit comments

Comments
 (0)