From d298b34c19d8e91bf790eb391db729676dc1205d Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 18 Oct 2014 13:23:05 +0200 Subject: [PATCH] Add detail namespace for number_of_elements --- glm/gtx/range.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index d86161ba..097e8501 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -40,7 +40,8 @@ #include "../gtc/type_ptr.hpp" -namespace glm +namespace glm{ +namespace detail { /* The glm types provide a .length() member, but for matrices this only defines the number of columns, so we need to work around this */ @@ -63,6 +64,7 @@ namespace glm detail::component_count_t number_of_elements_(genType const & m){ return detail::component_count(m) * detail::component_count(m[0]); } +}//namespace template const typename genType::value_type * begin(genType const & v){ @@ -71,7 +73,7 @@ namespace glm template const typename genType::value_type * end(genType const & v){ - return begin(v) + number_of_elements_(v); + return begin(v) + detail::number_of_elements_(v); } template @@ -81,6 +83,6 @@ namespace glm template typename genType::value_type * end(genType& v){ - return begin(v) + number_of_elements_(v); + return begin(v) + detail::number_of_elements_(v); } }//namespace glm