[dune-pdelab] const overloading ambiguity in powercompositegridfunctionspacebase.hh

Steffen Müthing steffen.muething at ipvs.uni-stuttgart.de
Mon Jan 9 11:33:58 CET 2012


Hi Christoph,

thanks for the heads up!

As it turns out, member visibility restrictions are not applied during name lookup,
causing this ambiguity. Fix commited in r1695.

Steffen

Am 05.01.2012 um 18:41 schrieb Christoph Grüninger:

> Hello,
> it seems to be a problem with ambiguous base classes, see e.g. [1].
> This patch made it compile:
> 
> Index: dune/pdelab/gridfunctionspace/powercompositegridfunctionspacebase.hh
> ===================================================================
> --- dune/pdelab/gridfunctionspace/powercompositegridfunctionspacebase.hh        (revision 1693)
> +++ dune/pdelab/gridfunctionspace/powercompositegridfunctionspacebase.hh        (working copy)
> @@ -124,7 +124,7 @@
>       template<typename CompositeGFS, typename Child, typename TreePath, typename ChildIndex>
>       void afterChild(CompositeGFS& cgfs, const Child& child, TreePath treePath, ChildIndex childIndex)
>       {
> -        std::size_t offset = offsets.back();
> +        std::size_t offset = offsets.TypeTree::FixedCapacityStackView<std::size_t>::back();
>         offsets.pop_back();
>         for (std::size_t i = offset; i < pos; ++i)
>           g[i] = cgfs.subMap(childIndex,g[i]);
> 
> 
> I do not know which of the base classs should be chosen:
>    template<typename T, std::size_t capacity>
>    class FixedCapacityStack
>      : private array<T,capacity>
>      , private FixedCapacityStackView<T>::Impl
>      , public FixedCapacityStackView<T>
> 
> Maybe some of the typetree authors could comment on that?
> 
> Nice weekend,
> Christoph
> 
> [1]http://stackoverflow.com/questions/1313063/request-for-member-is-ambiguous-in-g
> 
> -- 
> Wäre es nicht schön [..], wenn der Gödelsche Satz oder die Relativi-
> tätstheorie tatsächlich unmittelbare und weitrechende Implikationen
> für das Studium der Gesellschaft hätten? Oder wenn das Auswahlaxiom
> der Analyse von Gedichten dienlich wäre? Oder wenn die Topologie etwas
> mit der menschlichen Psyche zu tun hätte? Aber leider ist dem nicht so.
> [A. Sokal, J. Bricmont, Eleganter Unsinn, 1999]
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab

Steffen Müthing
Universität Stuttgart
Institut für Parallele und Verteilte Systeme
Universitätsstr. 38
70569 Stuttgart
Tel: +49 711 685 88429
Fax: +49 711 685 88340
Email: steffen.muething at ipvs.uni-stuttgart.de









More information about the dune-pdelab mailing list