Skip to content

Commit 71b336d

Browse files
committed
exapand sexp template
1 parent 084cf6d commit 71b336d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inst/include/cpp4r/r_string.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ inline SEXP as_sexp(std::initializer_list<r_string> il) {
155155
template <typename T, typename R = void>
156156
using enable_if_r_string = enable_if_t<std::is_same<T, cpp4r::r_string>::value, R>;
157157

158-
template <typename T>
159-
enable_if_r_string<T, SEXP> as_sexp(T from) {
158+
template <typename T, typename = enable_if_r_string<T>>
159+
SEXP as_sexp(T from) {
160160
r_string str(from);
161161
sexp res;
162162
unwind_protect([&] {

0 commit comments

Comments
 (0)