Hi Timo,

You are right. It works this way:

template <class TypeTag>
typename GET_PROP_TYPE(TypeTag, MyType) MyClass<TypeTag>::myStaticMember_;

I went to the Frühlingsfest yesterday and was therefore not able to understand 
what my compiler tried to tell me :)

Thanks

Georg


Von: Dumux [mailto:[email protected]] Im Auftrag von Timo
Gesendet: Freitag, 27. April 2018 10:33
An: [email protected]
Betreff: Re: [DuMuX] Property system and definition of static members


Hi Georg,

this is possible. What exactly is your problem? Is there a compiler error?

Timo

On 27.04.2018 09:19, [email protected]<mailto:[email protected]> wrote:
Hello Dumuxers,

My question is related to the property system: Is it possible to use a type 
from the TypeTag in a definition of a static member?
I would like to write something like:

template <class TypeTag>
GET_SOME_TYPE_HERE MyClass<TypeTag>::myStaticMember_;

The only workaround I found so far is to pass the type as an additional 
template parameter which seems somehow redundant since it is already part of 
the TypeTag.
I have to write:

template <class TypeTag, class MyType>
MyType MyClass<TypeTag>::myStaticMember_;

Is there a better solution to this?

Best regards

Georg Futter

--------------------------
German Aerospace Center (DLR)
Institute of Engineering Thermodynamics | Computational Electrochemistry | 
Pfaffenwaldring 38-40 | 70569 Stuttgart

Dipl.-Ing. Georg Futter | Ph.D. student
Telefon 0711/6862-8135 | [email protected]<mailto:[email protected]>
www.DLR.de<http://www.dlr.de/>






_______________________________________________

Dumux mailing list

[email protected]<mailto:[email protected]>

https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to