From 35465761e3cb099570d190c1c3ac0717f0272499 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 10 Sep 2015 12:07:50 -0500 Subject: [PATCH] Fix issues with #1573. Specifically, avoid an anonymous namespace in header files. Also remove unnecessary specializations of functions for const input arguments. --- include/deal.II/base/tensor.h | 61 ++++++++++------------------------- 1 file changed, 17 insertions(+), 44 deletions(-) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index cf52223b03..679909871a 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -898,53 +898,26 @@ namespace internal { namespace TensorSubscriptor { - namespace + template + ArrayElementType & + subscript (ArrayElementType *values, + const unsigned int i, + dealii::internal::int2type) { - template - ArrayElementType & - subscript (ArrayElementType *values, - const unsigned int i, - dealii::internal::int2type) - { - Assert (i - const ArrayElementType & - subscript (const ArrayElementType *values, - const unsigned int i, - dealii::internal::int2type) - { - Assert (i - ArrayElementType & - subscript (ArrayElementType *, - const unsigned int, - dealii::internal::int2type<0>) - { - Assert(false, ExcMessage("Cannot access elements of an object of type Tensor.")); - static ArrayElementType t; - return t; - } + Assert (i - const ArrayElementType & - subscript (const ArrayElementType *, - const unsigned int, - dealii::internal::int2type<0>) - { - Assert(false, ExcMessage("Cannot access elements of an object of type Tensor.")); - static ArrayElementType t; - return t; - } - + template + ArrayElementType & + subscript (ArrayElementType *, + const unsigned int, + dealii::internal::int2type<0>) + { + Assert(false, ExcMessage("Cannot access elements of an object of type Tensor.")); + static ArrayElementType t; + return t; } } } -- 2.39.5