Re: problem with generating and compiling dictionary for template class

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Tue, 24 Aug 2010 13:19:12 -0500


  Hi,

Indeed, there was a problem with bool in your case. This has been fixed thanks to your report in the trunk (revision 34966) and in the v5.26/00 patch branch.

Thanks for reporting this problem.
Philippe.

On 8/24/10 9:07 AM, Oleksandr Zenaiev wrote:
> Hello ROOTers,
>
> I have a problem with generating and compiling dictionary.
>
> Here is my header file (simplified enough to represent a problem):
>
> //file: UserEventVariable.hpp
> #ifndef USEREVENTVARIABLE_HPP_
> #define USEREVENTVARIABLE_HPP_
>
> template<class T>
> class Collection {
> public:
> typedef T value_type;
>
> public:
> ClassDef(Collection, 0);
> };
>
> template<class T>
> class UserEventVariable {};
>
> #endif
>
> and my LinkDef file:
>
> //file: UserEventVariable_linkdef.h
> #pragma link C++ class UserEventVariable<Bool_t>;
> #pragma link C++ class Collection< UserEventVariable<Bool_t> >;
>
> I generated dictionary with a command:
>
> rootcint -f UserEventVariable_dict.cpp -c UserEventVariable.hpp
> UserEventVariable_linkdef.h
>
> Then I tried to compile him:
>
> c++ `root-config --cflags` -c UserEventVariable_dict.cpp
>
> and I got this error:
>
> UserEventVariable_dict.cpp:40: error: template argument 1 is invalid
>
> Really, line 40 in generating dictionary looks a bit strange:
>
> //file: UserEventVariable_dict.cpp
> ...
> typedef ::UserEventVariable< ::bool> value_type;
> ...
>
> I do not have such problem with other template implementations (Int_t,
> Float_t, Double_t), only with Bool_t.
>
> I am using ROOT 5.26/00b (Gentoo, gcc 4.4.3) and I should say that with
> ROOT 5.24 I do not have this problem with the same code.
>
> Thanks in advance!
>
Received on Tue Aug 24 2010 - 20:20:32 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 25 2010 - 17:50:01 CEST