From e5901113750895dcf67d8075f484fbfbac349b1d Mon Sep 17 00:00:00 2001 From: jan p springer Date: Fri, 1 May 2015 13:42:56 +0100 Subject: [PATCH] added: 'operator<<(std::pair, tmat4x4>)' routed to 'operator<<(std::pair const, tmat4x4 const>)' to avoid specifier removal by 'std::make_pair<>' and follow-up type-deduction problems; see [http://stackoverflow.com/questions/29985791/] --- glm/gtx/io.hpp | 8 +++++++- glm/gtx/io.inl | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index b3842bbd..d112805d 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -214,12 +214,18 @@ namespace glm template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tmat4x4 const&); - template + template GLM_FUNC_DECL std::basic_ostream & operator<<( std::basic_ostream &, std::pair const, tmat4x4 const> const &); + template + GLM_FUNC_DECL std::basic_ostream & operator<<( + std::basic_ostream &, + std::pair, + tmat4x4> const &); + /// @} }//namespace glm diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index 5af266dd..9355b919 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -605,7 +605,7 @@ namespace io return os; } - + template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<( std::basic_ostream & os, @@ -645,4 +645,13 @@ namespace io return os; } + + template + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<( + std::basic_ostream & os, + std::pair, tmat4x4> const& a) + { + return operator<<(os, static_cast const, tmat4x4 const> const&>(a)); + } + }//namespace glm