[Dune] what is a const template parameter?

Aleksejs Fomins aleksejs.fomins at lspr.ch
Tue Jan 13 15:47:58 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Dune,

Another quick question. When GeomGrid accesses the traits of a
geometry from another class, for example, the entity class, it says
sth like

typedef typename remove_const< Grid >::type::Traits Traits;

The entity is given in EntityPointerTraits as

Dune::Entity< codimension, dimension, const Grid, GeoGrid::Entity >
Entity;


Why would one prefer to use a const template parameter? In my
ignorance I never even knew this was possible before I saw it here.

Thanks
Aleksejs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJUtTAeAAoJEDkNM7UOEwMZtFoQANH+4z3VX8sxUCjAt1Uo7B/y
r4hsUYOm4qVPSIrU400rgXLG3+jxJX2+cpKlGJwA0KIEo0Y/LuUwVrDrLwmhmDLZ
6t4HXPYmFxYsB83pAJdPIvqM4UdCDyefEJM9XGj3xtRFE5agQBDkTeQ8I4dnR52W
J7eqZSZHfUqajYxdDLbs0Kp5IKOTQUuF7a2Y4Z0/AMfpKySvGw+lZF3mcWa/ieno
vVhMaZAElOuxCxbJgadb7xlP7wuWZbAVXc5JEYe4QA2EPbTOUVvt4ZPC10lTRLoS
VjezQ+8EFFSQ2emBWuk1FK+MUl4sXq0Ho7WnHw+xTmDbNHCrks4CYOd9t68Q73nJ
fzYg+XrclNtnmLR5uFro/ydWPSD3/hf0gaSOwWdUI1/6mqK8mIVAjWiajh/TCZQW
Z3Z93hJhtmRpeNhoR4dRjQZP0nkd1RxH8cdZMnf2V+nFv6tSnjEPTba350Kg53KA
fVf121/4IyIzZt/NRVTysaiIllfv0dalAKSrSEVJlq8bYnq08Qg880SHX4n7hlyH
3q/UbPotpKMqlfjYkBgZJcRy/BJxngCI25dXfNwgt2lzKLab7Mf3rXgs3fWR3UsT
0cihGY40xKP8Kr0H0hXBbLPpmKsaD1GhPF5Z0fP1P/7i8lWqZbpz1deh02VyKT5t
aXzACUzJ9iRHT+iPRLUB
=dThA
-----END PGP SIGNATURE-----




More information about the Dune mailing list