Skip to content
Snippets Groups Projects
Commit d97fc1b5 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[bugfix] Restore reference semantics of ReferenceElement methods

By using decltype(auto) we forward references of the
implementation as references. This reverts the interface
change introduced in !52 in case the implementation returns
references. As a consequence the all tests in dune-localfunctions
pass again.

For (possible) implementations returning values these will
also be forwarded. In the future (after a grace period of
one release), this should be switched to references completely
as proposed in !52.
parent ab48c9cb
Branches feature/combine-release-master-changelogs
No related tags found
1 merge request!61[bugfix] Restore reference semantics of ReferenceElement methods
......@@ -140,14 +140,14 @@ namespace Dune {
* \param[in] i number of subentity E (0 <= i < size( c ))
* \param[in] c codimension of subentity E
*/
GeometryType type(int i, int c) const
decltype(auto) type(int i, int c) const
{
return _impl->type(i,c);
}
/** \brief obtain the type of this reference element */
GeometryType type() const
decltype(auto) type() const
{
return _impl->type();
}
......@@ -162,7 +162,7 @@ namespace Dune {
* \param[in] i number of subentity E (0 <= i < size( c ))
* \param[in] c codimension of subentity E
*/
Coordinate position(int i, int c) const
decltype(auto) position(int i, int c) const
{
return _impl->position(i,c);
}
......@@ -213,7 +213,7 @@ namespace Dune {
*
* \param[in] face index of the face, whose normal is desired
*/
Coordinate integrationOuterNormal(int face) const
decltype(auto) integrationOuterNormal(int face) const
{
return _impl->integrationOuterNormal(face);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment