THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#214 - Implement naming rules for class names
User who did this - Bernd Flemisch (bernd)

----------
I did a little study with the RichardsProblem, which has recently been renamed 
from RichardsBoxProblem. Suppose that I have a problem file using the old class 
name
- at inheritance:
  class RichardsLensProblem : public RichardsBoxProblem<TypeTag>

- at a typedef:
    typedef RichardsBoxProblem<TypeTag> ParentType;

- at a constructor:
    RichardsLensProblem(TimeManager &timeManager,
                        const GridView &gridView)
        : RichardsBoxProblem<TypeTag>(timeManager, gridView)

I tried several deprecations:

This one gives warnings only with gcc 5.0 and only at typedef:
template<class TypeTag>
using RichardsBoxProblem DUNE_DEPRECATED = RichardsProblem<TypeTag>;

This one gives warnings only with gcc 5.0, clang 3.5, both at typedef and 
constructor, and with gcc 5.0 also at inheritance:
template<class TypeTag>
class RichardsBoxProblem : public RichardsProblem<TypeTag>
{
public:
    using RichardsProblem<TypeTag>::RichardsProblem;
} DUNE_DEPRECATED;

Same with the following:
template<class TypeTag>
class RichardsBoxProblem : public RichardsProblem<TypeTag>
{
    typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
    typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
public:
    RichardsBoxProblem(TimeManager &timeManager, const GridView &gridView)
    : RichardsProblem<TypeTag>(timeManager, gridView)
    {}
} DUNE_DEPRECATED;

This one gives warnings with all supported compilers, but only at constructor:
template<class TypeTag>
class RichardsBoxProblem : public RichardsProblem<TypeTag>
{
    typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
    typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
public:
    RichardsBoxProblem(TimeManager &timeManager, const GridView &gridView)
    DUNE_DEPRECATED : RichardsProblem<TypeTag>(timeManager, gridView)
    {}
};

This one gives warnings with all supported compilers only at constructor, with 
clang 3.5 and gcc 5.0 addtionally at typedef and constructor (a second 
warning), and with gcc 5.0 additionally at inheritance:
template<class TypeTag>
class RichardsBoxProblem : public RichardsProblem<TypeTag>
{
    typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
    typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
public:
    RichardsBoxProblem(TimeManager &timeManager, const GridView &gridView)
    DUNE_DEPRECATED : RichardsProblem<TypeTag>(timeManager, gridView)
    {}
} DUNE_DEPRECATED;

Although it is cumbersome to write, I propose to go with the last one until our 
minimally supported compiler detects easier ones properly. Of course, I would 
appreciate better solutions.

----------

More information can be found at the following URL:
http://www.dumux.org/flyspray/index.php?do=details&task_id=214#comment563

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to