diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index f5d0cbc1a9c95..1b69468b3bf04 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -22,7 +22,7 @@ #include #undef Free -#include "arrow/util/nameof.h" +#include "./nameof.h" namespace cpp11 { @@ -160,8 +160,8 @@ struct ns { template Pointer r6_to_pointer(SEXP self) { if (!Rf_inherits(self, "ArrowObject")) { - std::string type_name = - arrow::util::nameof::type>(); + std::string type_name = arrow::util::nameof< + cpp11::decay_t::type>>(); cpp11::stop("Invalid R object for %s, must be an ArrowObject", type_name.c_str()); } void* p = R_ExternalPtrAddr(Rf_findVarInFrame(self, arrow::r::symbols::xp)); diff --git a/cpp/src/arrow/util/nameof.h b/r/src/nameof.h similarity index 100% rename from cpp/src/arrow/util/nameof.h rename to r/src/nameof.h