Skip to content

Commit 257c8be

Browse files
committed
Move wrap definition to wrap_end
1 parent b97348e commit 257c8be

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

inst/include/Rcpp/internal/wrap.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,10 +894,7 @@ inline SEXP rowmajor_wrap(InputIterator first, int nrow, int ncol){
894894
*
895895
*/
896896
template <typename T>
897-
inline SEXP wrap(const T& object){
898-
RCPP_DEBUG_1( "inline SEXP wrap<%s>(const T& object)", DEMANGLE(T) )
899-
return internal::wrap_dispatch( object, typename ::Rcpp::traits::wrap_type_traits<T>::wrap_category() ) ;
900-
}
897+
inline SEXP wrap(const T& object) ;
901898

902899
template <> inline SEXP wrap<Rcpp::String>( const Rcpp::String& object) ;
903900

inst/include/Rcpp/internal/wrap_end.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424

2525
namespace Rcpp{
2626

27+
template <typename T>
28+
inline SEXP wrap(const T& object){
29+
RCPP_DEBUG_1( "inline SEXP wrap<%s>(const T& object)", DEMANGLE(T) )
30+
return internal::wrap_dispatch( object, typename ::Rcpp::traits::wrap_type_traits<T>::wrap_category() ) ;
31+
}
32+
2733
template <typename T>
2834
inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::normal_wrap_tag ){
2935
return wrap( obj ) ;

inst/include/RcppCommon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ namespace Rcpp{
167167
#include <Rcpp/vector/VectorBase.h>
168168
#include <Rcpp/vector/MatrixBase.h>
169169

170-
#include <Rcpp/internal/wrap.h>
171-
172170
#include <Rcpp/internal/ListInitialization.h>
173171
#include <Rcpp/internal/Proxy_Iterator.h>
174172
#include <Rcpp/internal/SEXP_Iterator.h>
@@ -181,4 +179,6 @@ namespace Rcpp{
181179
#include <Rcpp/iostream/Rstreambuf.h>
182180
#include <Rcpp/longlong.h>
183181

182+
#include <Rcpp/internal/wrap.h>
183+
184184
#endif

0 commit comments

Comments
 (0)