CINT std::priority_queue<TObject*,std::vector<TObject>>error

Hello,

Using ROOT-5.34.21 (CINT 5.18.00), if I try to fill a std::priority_queue with TObject (header file is attached,
TObject* = NtupleMerge* ) as

std::priority_queue<TObject*, std::vector<TOBject*>, TObject> pq ;
its failing.
My LinkDef.hh has CINT include statement
#pragma link C++ class RAT::NtupleMerge+ ;
and my MAKECINT has
#pragma link C++ class std::vectorRAT::NtupleMerge*;
#pragma link C++ class std::priority_queue<RAT::NtupleMerge*, std::vectorRAT::NtupleMerge*, RAT::NtupleMerge >+;

:question:
Error: Symbol priority_queue is not defined in current scope (tmpfile):1:
Error: Symbol NtupleMerge is not defined in current scope (tmpfile):1:
Error: Symbol vector is not defined in current scope (tmpfile):1:

:blush:

However, if I am trying to define std::vector<NtupleMerge*> alone not inside priority_queue, it does work after adding the definition in CINT
#pragma link C++ class std::vectorRAT::NtupleMerge*;
#-o

Is this a bug or something else is going on ? My LinkDef file is also attached.

Kalpana
LinkDef.hh (6.77 KB)
NtupleMerge.hh (5.44 KB)

I’m afraid the problem is that, if you "#include ", CINT / MAKECINT / ROOTCINT know only the std::queue class template (see the “${ROOTSYS}/cint/cint/lib/prec_stl/queue” file).
If you "#include , you may get a “priority_queue” in CINT / MAKECINT / ROOTCINT (see the “${ROOTSYS}/cint/cint/stl/_stack.h” file), but I’m afraid it is not compatible with the std::priority_queue class template.
Well, I think this issue should be fixed in CINT.

Hi,

Please either compile your code using ACLiC (.L NtupleMerge.cxx+) or move to ROOT 6.

Cheers, Axel.