From 9ef681483ea9adddaf63017dbe2343521646b986 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 13 Sep 2007 18:50:50 +0000 Subject: [PATCH] Work around bugs in Sun Studio 11 [SVN r39243] --- include/boost/concept/detail/has_constraints.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/boost/concept/detail/has_constraints.hpp b/include/boost/concept/detail/has_constraints.hpp index 7ffbb24..3112b55 100755 --- a/include/boost/concept/detail/has_constraints.hpp +++ b/include/boost/concept/detail/has_constraints.hpp @@ -5,7 +5,7 @@ # define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP # include - +# include namespace boost { namespace concept { namespace detail @@ -19,9 +19,17 @@ namespace detail template struct wrap_constraints {}; +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) + // Work around the following bogus error in Sun Studio 11, by + // turning off the has_constraints function entirely: + // Error: complex expression not allowed in dependent template + // argument expression + inline no has_constraints_(...); +#else template inline yes has_constraints_(Model*, wrap_constraints* = 0); inline no has_constraints_(...); +#endif } // This would be called "detail::has_constraints," but it has a strong