Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
6.22/02
-
None
-
Centos7, gcc9
Description
The following reproducer fails when using the '6.22.00-patches' and 'master' branches and does not fail when using 6.22.00 (with the LCG patch) as it is released in LCG_89.
$ cat test.py
|
from __future__ import print_function |
import ROOT |
|
ROOT.gInterpreter.Declare("""
|
#include <string>
|
class CppAlg { |
public:
|
CppAlg(std::string name) : m_name(name) {}
|
virtual void virtual_method(std::string&) { }
|
void call() { virtual_method(m_name); }
|
virtual ~CppAlg() {}
|
private:
|
std::string m_name;
|
};
|
""")
|
|
class Alg(ROOT.CppAlg): |
def __init__(self, name): |
super(Alg, self).__init__(name) |
def virtual_method(self, name): |
print('Overwritten virtual method', name) |
a = Alg('MyAlg') |
a.call()
|
To reproduce:
$ source /cvmfs/sft.cern.ch/lcg/views/dev4/latest/x86_64-centos7-gcc9-opt/setup.sh
|
$ python test.py
|
Traceback (most recent call last):
|
File "test.py", line 22, in <module>
|
a = Alg('MyAlg')
|
File "test.py", line 19, in __init__
|
super(Alg, self).__init__(name)
|
TypeError: none of the 2 overloaded methods succeeded. Full details:
|
no constructor available for 'CppAlg'
|
CppAlg::CppAlg(const CppAlg&) =>
|
TypeError: could not convert argument 1
|
while with LCG_98
$ source /cvmfs/sft.cern.ch/lcg/views/LCG_98/x86_64-centos7-gcc9-opt/setup.sh
|
$ python test.py
|
Overwritten virtual method MyAlg
|