Pair operator= problem

There seems to exist a problem in the CINT interpreter: [code]root [0] #include
root [1] pair<int,int> p(1,2)
root [2] pair<int,int> pp(3,4)
root [3] pp = p
Error: can not call private or protected function (tmpfile):1:
(compiled) 0 pair<int,int>& pair<int,int>::operator=(const pair<int,int>&);
Calling : pair<int,int>::operator=(pair<int,int>);
Match rank: file line signature

  •    1 (compiled)   0 pair<int,int>& pair<int,int>::operator=(const pair<int,int>&);

*** Interpreter error recovered ***[/code]
See also [url]Cannot generate dictionary for STL map container


This problem exist because the operator= can not be instantiated in all possible case of the template parameter value and CINT has not provision/code to decide when to generate the dictionary or not generate the dictionary for a concrete function a class template instance. So if the operator= was not claimed to be private for dictionary generation, for some set of template parameter, you could not generate the dictionary at all …

Bottom line, this will be fixed by Cling :slight_smile:.