From: Dragan Nikolic Date: Wed, 14 Sep 2016 12:33:29 +0000 (-0600) Subject: Move explicit specializations to the .cc file. X-Git-Tag: v8.5.0-rc1~672^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9a53edde71569c058c550486fae3354913797bb;p=dealii.git Move explicit specializations to the .cc file. --- diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index ddb2f0b4a2..8a141b455d 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -1031,6 +1031,22 @@ private: #ifndef DOXYGEN +//------------------------ declarations for explicit specializations + +#ifdef DEAL_II_BOOST_BIND_COMPILER_BUG +template <> +Vector > & +Vector >::operator= (const std::complex s); +#endif + + +template <> +Vector::real_type +Vector::lp_norm (const real_type) const; + + +//------------------------ inline functions + template inline Vector::Vector () diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 7ec0cd768e..0a1177cf50 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -383,23 +383,6 @@ Vector::operator= (const Number s) -#ifdef DEAL_II_BOOST_BIND_COMPILER_BUG -template <> -Vector > & -Vector >::operator= (const std::complex s) -{ - AssertIsFinite(s); - if (s != std::complex()) - Assert (vec_size!=0, ExcEmptyObject()); - if (vec_size!=0) - std::fill (begin(), end(), s); - - return *this; -} -#endif - - - template Vector &Vector::operator *= (const Number factor) { @@ -604,16 +587,6 @@ Vector::lp_norm (const real_type p) const -template <> -Vector::real_type -Vector::lp_norm (const real_type) const -{ - Assert(false, ExcMessage("No lp norm for integer vectors")); - return -1; -} - - - template typename Vector::real_type Vector::linfty_norm () const diff --git a/source/lac/vector.cc b/source/lac/vector.cc index 4f23c08d2d..e7f0a283ed 100644 --- a/source/lac/vector.cc +++ b/source/lac/vector.cc @@ -66,4 +66,27 @@ TEMPL_OP_EQ(std::complex,std::complex); #undef TEMPL_OP_EQ +#ifdef DEAL_II_BOOST_BIND_COMPILER_BUG +template <> +Vector > & +Vector >::operator= (const std::complex s) +{ + AssertIsFinite(s); + if (s != std::complex()) + Assert (vec_size!=0, ExcEmptyObject()); + if (vec_size!=0) + std::fill (begin(), end(), s); + + return *this; +} +#endif + +template <> +Vector::real_type +Vector::lp_norm (const real_type) const +{ + Assert(false, ExcMessage("No lp norm for integer vectors")); + return -1; +} + DEAL_II_NAMESPACE_CLOSE