From 5fb17f027f6f022ceff73071722dc68166af67cd Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Mon, 3 Sep 2001 15:42:55 +0000 Subject: [PATCH] SGI MIPSpro workaround in default_arg error checking [SVN r10998] --- include/boost/tuple/detail/tuple_basic.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 779e4dd..5094a87 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -83,7 +83,16 @@ struct default_arg { template struct default_arg { static T& f() { +#ifndef __sgi return generate_error::no_default_values_for_reference_types; +#else + // MIPSpro instantiates functions even when it should not, so + // this technique can not be used for error checking. + // The simple workaround is to just not have this error checking + // with MIPSpro. + static T x; + return x; +#endif } };