From c4e367e648c90a5170a6f306cd4d5522a3330bbe Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 28 Aug 2017 12:25:23 +1000 Subject: [PATCH] coord: use std::size_t over size_t --- coord/base.hpp | 22 +-- coord/fwd.hpp | 16 ++- coord/init.hpp | 8 +- coord/iostream.hpp | 12 +- coord/names.hpp | 4 +- coord/ops.hpp | 324 ++++++++++++++++++++++----------------------- coord/store.hpp | 12 +- 7 files changed, 200 insertions(+), 198 deletions(-) diff --git a/coord/base.hpp b/coord/base.hpp index e63e4a52..2afb74bd 100644 --- a/coord/base.hpp +++ b/coord/base.hpp @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright 2012-2016 Danny Robson + * Copyright 2012-2017 Danny Robson */ -#ifndef __UTIL_COORD_BASE_HPP -#define __UTIL_COORD_BASE_HPP +#ifndef CRUFT_UTIL_COORD_BASE_HPP +#define CRUFT_UTIL_COORD_BASE_HPP #include "init.hpp" @@ -29,9 +29,9 @@ namespace util::coord { ///////////////////////////////////////////////////////////////////////// template < - size_t S, + std::size_t S, typename T, - template class KLASS, + template class KLASS, typename ...tags > struct base : public init { @@ -39,11 +39,11 @@ namespace util::coord { static_assert (std::is_arithmetic::value); using value_type = T; - static constexpr size_t dimension = S; - static constexpr size_t elements = S; + static constexpr std::size_t dimension = S; + static constexpr std::size_t elements = S; /// returns the number of elements we contain - static constexpr size_t size (void) { return S; } + static constexpr std::size_t size (void) { return S; } // inherit the fancy elementwise constructors from `init'. using init::init; @@ -67,8 +67,8 @@ namespace util::coord { base& operator= (const base &rhs) = default; // element accessors - T& operator[] (size_t i) { return this->data[i]; } - constexpr const T& operator[] (size_t i) const { return this->data[i]; } + T& operator[] (std::size_t i) { return this->data[i]; } + constexpr const T& operator[] (std::size_t i) const { return this->data[i]; } auto cbegin (void) const { return std::cbegin (this->data); } auto cend (void) const { return std::cend (this->data); } @@ -87,7 +87,7 @@ namespace util::coord { /////////////////////////////////////////////////////////////////////// // conversions - template