Skip to content

g++ 4.8 still confused about shared_ptr<T> being constructible from SEXP #96

Description

@romainfrancois

This looks like a bug of the compiler IIUC. https://github.com/apache/arrow/pull/7819/checks?check_run_id=997448752

array_from_vector.cpp: In function ‘std::shared_ptr<arrow::DataType> arrow::r::InferArrowTypeFromVector(SEXP) [with int VectorType = 4; SEXP = SEXPREC*]’:
3602
array_from_vector.cpp:1198:58: error: call of overloaded ‘as_cpp(SEXPREC*&)’ is ambiguous
3603
return cpp11::as_cpp<std::shared_ptr<arrow::Array>>(x)->type();
3604
^
3605
array_from_vector.cpp:1198:58: note: candidates are:
3606
In file included from /opt/R/4.0.2/lib/R/library/cpp11/include/cpp11.hpp:5:0,
3607
from ././arrow_cpp11.h:36,
3608
from ./arrow_types.h:22,
3609
from array_from_vector.cpp:20:
3610
/opt/R/4.0.2/lib/R/library/cpp11/include/cpp11/as.hpp:66:41: note: cpp11::enable_if_constructible_from_sexp<T, T> cpp11::as_cpp(SEXP) [with T = std::shared_ptr<arrow::Array>; cpp11::enable_if_constructible_from_sexp<T, T> = std::shared_ptr<arrow::Array>; SEXP = SEXPREC*]
3611
enable_if_constructible_from_sexp<T, T> as_cpp(SEXP from) {
3612
^
3613
In file included from ./arrow_types.h:22:0,
3614
from array_from_vector.cpp:20:
3615
././arrow_cpp11.h:215:25: note: cpp11::enable_if_shared_ptr<T> cpp11::as_cpp(SEXP) [with T = std::shared_ptr<arrow::Array>; cpp11::enable_if_shared_ptr<T> = std::shared_ptr<arrow::Array>; SEXP = SEXPREC*]
3616
enable_if_shared_ptr<T> as_cpp(SEXP from) {
3617
^
3618

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions