File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
DataFormats/TestObjects/src Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 4444
4545#include < list>
4646#include < algorithm>
47+
48+ // related to SchemaEvolutionTestObjects.h
49+ #ifndef DataFormats_TestObjects_USE_OLD
50+
51+ // The following is from an example by Jakob Blomer from the ROOT team
52+ namespace edmtest ::compat {
53+ template <typename T>
54+ struct deprecated_auto_ptr {
55+ // We use compat_auto_ptr only to assign the wrapped raw pointer
56+ // to a unique pointer in an I/O customization rule.
57+ // Therefore, we don't delete on destruction (because ownership
58+ // gets transferred to the unique pointer).
59+
60+ // ~deprecated_auto_ptr() { delete _M_ptr; }
61+
62+ T *_M_ptr = nullptr ;
63+ };
64+ } // namespace edmtest::compat
65+
66+ #endif
Original file line number Diff line number Diff line change @@ -411,10 +411,17 @@ exception when running testMissingDictionaryChecking_cfg.py.
411411 <version ClassVersion =" 3" checksum =" 1545257825" />
412412 </class >
413413 <class name =" std::auto_ptr<edmtest::SchemaEvolutionContained>" />
414+ <class name =" edmtest::compat::deprecated_auto_ptr<edmtest::SchemaEvolutionContained>" />
414415 <class name =" edmtest::SchemaEvolutionAutoPtrToUniquePtr" ClassVersion =" 4" >
415416 <version ClassVersion =" 4" checksum =" 2908944573" />
416417 <version ClassVersion =" 3" checksum =" 1427898213" />
417418 </class >
419+ <ioread sourceClass =" std::auto_ptr<edmtest::SchemaEvolutionContained>" targetClass =" edmtest::compat::deprecated_auto_ptr<edmtest::SchemaEvolutionContained>" />
420+ <ioread sourceClass =" edmtest::SchemaEvolutionAutoPtrToUniquePtr" version =" [3]" targetClass =" edmtest::SchemaEvolutionAutoPtrToUniquePtr" source =" edmtest::compat::deprecated_auto_ptr<edmtest::SchemaEvolutionContained> contained_" target =" contained_" >
421+ <![CDATA[
422+ contained_.release(); contained_.reset(onfile.contained_._M_ptr);
423+ ]]>
424+ </ioread >
418425 <class name =" edmtest::SchemaEvolutionCArrayToStdArray" ClassVersion =" 4" >
419426 <version ClassVersion =" 4" checksum =" 66373354" />
420427 <version ClassVersion =" 3" checksum =" 2848265407" />
You can’t perform that action at this time.
0 commit comments