Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-09-13 14:50:51


Author: dgregor
Date: 2007-09-13 14:50:50 EDT (Thu, 13 Sep 2007)
New Revision: 39243
URL: http://svn.boost.org/trac/boost/changeset/39243

Log:
Work around bugs in Sun Studio 11
Text files modified:
   trunk/boost/concept/detail/has_constraints.hpp | 10 +++++++++-
   1 files changed, 9 insertions(+), 1 deletions(-)

Modified: trunk/boost/concept/detail/has_constraints.hpp
==============================================================================
--- trunk/boost/concept/detail/has_constraints.hpp (original)
+++ trunk/boost/concept/detail/has_constraints.hpp 2007-09-13 14:50:50 EDT (Thu, 13 Sep 2007)
@@ -5,7 +5,7 @@
 # define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
 
 # include <boost/mpl/bool.hpp>
-
+# include <boost/detail/workaround.hpp>
 namespace boost { namespace concept {
 
 namespace detail
@@ -19,9 +19,17 @@
   template <class Model, void (Model::*)()>
   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 <class Model>
   inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
   inline no has_constraints_(...);
+#endif
 }
 
 // This would be called "detail::has_constraints," but it has a strong


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk