Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
36a7534
[TCling] Use string,vector instead of std.
Axel-Naumann Jul 22, 2022
9670fe8
[test] Remove legacy using namespace std/stdext.
Axel-Naumann May 9, 2023
38a0341
[proof] Remove unnecessary `using namespace std` in header.
Axel-Naumann May 9, 2023
1395866
[foundation] Add doc to some TClassEdit functions (NFC).
Axel-Naumann May 9, 2023
7c7a1d5
[dictgen] Make gOptNoGlobalUsingStd the default and only way.
Axel-Naumann May 9, 2023
6a2a6a7
[dictgen] Remove unused var; add using decls for std types.
Axel-Naumann May 10, 2023
d9edba9
[core] In generated dict code, always prefix std classes with "std":
Axel-Naumann May 10, 2023
859bfeb
[mathcore] Do not generate a dict for vector<double> iters:
Axel-Naumann May 10, 2023
f1065cb
[foundation] TClassEdit::InsertStd: add PRNG types to std type list.
Axel-Naumann May 11, 2023
c6ec900
Do not generate dicts for iterators:
Axel-Naumann May 11, 2023
542e382
[foundation] Fix spelling of std types; add missing ones, rm auto_ptr.
Axel-Naumann May 11, 2023
cdc2a31
[io] Diagnose missing stdlib I/O support:
Axel-Naumann May 15, 2023
4503bd0
[geo] Do not generate dictionaries for thread::id:
Axel-Naumann May 15, 2023
52e9f32
[fumili] no dict for TFumiliMinimizer: not persistent and not a TObje…
Axel-Naumann May 15, 2023
430660e
[clingutils] Fwd decls must use "std::" where needed:
Axel-Naumann May 15, 2023
a316141
[dictgen] Inject using decls for common stdlib names in ACLiC dicts:
Axel-Naumann May 16, 2023
32f08fa
[core] Do not InspectMembers() for stdlib types:
Axel-Naumann May 16, 2023
353faaa
[core] Centralize using decls injected into cling, add more.
Axel-Naumann May 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[core] Do not InspectMembers() for stdlib types:
This prevents TClass getting confused about normalized names in std::
which will likely be implementation details
  • Loading branch information
Axel-Naumann committed May 16, 2023
commit 32f08faf28c213c95ca66204bdaf1cff2a9fc659
3 changes: 3 additions & 0 deletions core/meta/inc/TDictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ class TDictionary : public TNamed {
static TDictionary* GetDictionary(const char* name);
static TDictionary* GetDictionary(const std::type_info &typeinfo);

/// Return `true` if the TClass representd a name in the `std::` namespace.
Bool_t IsInStdLib() const { return Property() & kIsDefinedInStd; }

// Type of STL container (returned by IsSTLContainer).
enum ESTLType {
kNone = ROOT::kNotSTL,
Expand Down
13 changes: 4 additions & 9 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2661,16 +2661,11 @@ void TCling::InspectMembers(TMemberInspector& insp, const void* obj,
return;
}

static const TClassRef clRefString("std::string");
if (clRefString == cl) {
// We stream std::string without going through members..
if (cl->IsInStdLib() && strncmp(cl->GetName(), "unique_ptr<", 11) != 0)
// We stream std::string and friends without going through members.
// `CloseStreamerInfoROOTFile()` needs to know the internal structure
// of std::unique_ptr.
return;
}

if (TClassEdit::IsStdArray(cl->GetName())) {
// We treat std arrays as C arrays
return;
}

const char* cobj = (const char*) obj; // for ptr arithmetics

Expand Down