Skip to content

std::basic_string's operator== set invisible at template-instantiation time from PCMs #23495

Description

@guitargeek

The std::basic_string's operator== set seems invisible at template-instantiation time from PCMs because bits/basic_string.h appears to be unmapped in cling's std.modulemap

Reproducer:

  • Revert acc9402 from [DF] Avoid operator==(string const &, const char*) in RInterface.hxx #23481, so we're using std::basic_string's operator== in the RInterface.hxx header that ends up in the ROOTDataFrame module

  • Run this code with root -q repro:

     #include "ROOT/RDataFrame.hxx"
    
     int repro() {
        // Coes doesn't even need to be executed
        if (false) {
           ROOT::RDataFrame df("t", "in.root");
           df.Snapshot("t", "out.root", {"b"});
        }
        return 0;
     }

Expected error (truncated):

Processing ../root_src/repro.C...
In module 'ROOTDataFrame':
/home/rembserj/code/root/root_build/include/ROOT/RDF/RInterface.hxx:3264:53: error:
      invalid operands to binary expression ('std::string' (aka
      'basic_string<char>') and 'const char[10]')
         if (RDFInternal::GetDataSourceLabel(*this) == "RNTupleDS" &&
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
/home/rembserj/code/root/root_build/include/ROOT/RDF/RInterface.hxx:3379:14: note:
      in instantiation of member function
      'ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>::Snapshot'
      requested here
      return Snapshot(treename, filename, selectedColumns, options);
             ^
/home/rembserj/code/root/root_src/repro.C:8:10: note: in instantiation of
      member function
      'ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>::Snapshot'
      requested here
      df.Snapshot("t", "out.root", {"b"});
         ^
/home/rembserj/code/root/root_build/include/ROOT/RResultPtr.hxx:422:6: note:
      candidate template ignored: could not match 'RResultPtr' against
      'basic_string'
bool operator==(const RResultPtr<T1> &lhs, const RResultPtr<T2> &rhs)
     ^
/home/rembserj/code/root/root_build/include/ROOT/RResultPtr.hxx:434:6: note:
      candidate template ignored: could not match 'RResultPtr' against
      'basic_string'
bool operator==(const RResultPtr<T1> &lhs, std::nullptr_t rhs)
     ^

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions