Skip to content

Commit 0a9c71e

Browse files
simplify replicate so that it is not restricted to DelayedCall
1 parent 01439a3 commit 0a9c71e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

inst/include/Rcpp/sugar/functions/replicate.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ namespace sugar{
3939

4040
} // sugar
4141

42-
template <typename OUT, typename... Args>
43-
inline sugar::Replicate<OUT, typename sugar::DelayedCall<OUT,OUT (*)(Args...), Args... > >
44-
replicate( size_t n, const sugar::DelayedCall<OUT,OUT (*)(Args...), Args... >& call){
45-
return sugar::Replicate<OUT, typename sugar::DelayedCall<OUT,OUT (*)(Args...), Args... > >( n, call ) ;
42+
template <typename OUT, typename CallType>
43+
inline sugar::Replicate<OUT, CallType>
44+
replicate( size_t n, const CallType& call){
45+
return sugar::Replicate<OUT, CallType>( n, call ) ;
4646
}
4747

4848

File renamed without changes.

0 commit comments

Comments
 (0)