From 13063abce500aeb5fa6ea28b281156a4278a0dc1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 23 Feb 2017 20:10:40 +0000 Subject: [PATCH] Move friend function outside of class The use of std::pair was causing issues with the sun compiler. --- test/objects/exception.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/objects/exception.hpp b/test/objects/exception.hpp index da11cf56..d5f0f5db 100644 --- a/test/objects/exception.hpp +++ b/test/objects/exception.hpp @@ -123,21 +123,21 @@ class object : private counted_object return object(::test::generate(x, g), ::test::generate(x, g)); } - friend std::pair generate( - std::pair const*, random_generator g) - { - int* x = 0; - return std::make_pair( - object(::test::generate(x, g), ::test::generate(x, g)), - object(::test::generate(x, g), ::test::generate(x, g))); - } - friend std::ostream& operator<<(std::ostream& out, object const& o) { return out << "(" << o.tag1_ << "," << o.tag2_ << ")"; } }; +std::pair generate( + std::pair const*, random_generator g) +{ + int* x = 0; + return std::make_pair( + object(::test::generate(x, g), ::test::generate(x, g)), + object(::test::generate(x, g), ::test::generate(x, g))); +} + class hash { int tag_;