From commits-return-3294-apmail-stdcxx-commits-archive=stdcxx.apache.org@stdcxx.apache.org Tue Jul 22 20:50:02 2008 Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 43858 invoked from network); 22 Jul 2008 20:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 20:50:02 -0000 Received: (qmail 41469 invoked by uid 500); 22 Jul 2008 20:50:02 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 41453 invoked by uid 500); 22 Jul 2008 20:50:02 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 41444 invoked by uid 99); 22 Jul 2008 20:50:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 13:50:02 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 20:49:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D55362388987; Tue, 22 Jul 2008 13:49:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r678894 - /stdcxx/branches/4.3.x/include/rw/_meta_prop.h Date: Tue, 22 Jul 2008 20:49:11 -0000 To: commits@stdcxx.apache.org From: vitek@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080722204911.D55362388987@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vitek Date: Tue Jul 22 13:49:11 2008 New Revision: 678894 URL: http://svn.apache.org/viewvc?rev=678894&view=rev Log: 2008-07-22 Travis Vitek STDCXX-1002 * include/rw/_meta_prop.h [__SUNPRO_CC]: Work around sunpro-5.9 detecting cv-qualifiers on array types. Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=678894&r1=678893&r2=678894&view=diff ============================================================================== --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Tue Jul 22 13:49:11 2008 @@ -45,18 +45,71 @@ template <> struct Trait : __rw_true_type { } +#if defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x590) + template -struct __rw_is_const : __rw_false_type +struct __rw_is_const_impl { + struct _C_no { }; + struct _C_yes { _C_no __pad [2]; }; + + template + struct _C_nest { }; + + template + static _C_yes _C_test (_C_nest*); + + template + static _C_no _C_test (_C_nest<_TypeU>*); + + enum { _C_value = + sizeof (_C_test ((_C_nest<_TypeT>*)0)) == sizeof (_C_yes) + }; }; template -struct __rw_is_const : __rw_true_type +struct __rw_is_const + : __rw_integral_constant::_C_value> { }; -#define _RWSTD_IS_CONST(T) _RW::__rw_is_const::value +template +struct __rw_is_volatile_impl +{ + struct _C_no { }; + struct _C_yes { _C_no __pad [2]; }; + template + struct _C_nest { }; + + template + static _C_yes _C_test (_C_nest*); + + template + static _C_no _C_test (_C_nest<_TypeU>*); + + enum { _C_value = + sizeof (_C_test ((_C_nest<_TypeT>*)0)) == sizeof (_C_yes) + }; +}; + +template +struct __rw_is_volatile + : __rw_integral_constant::_C_value> +{ +}; + +#else + +template +struct __rw_is_const : __rw_false_type +{ +}; + +template +struct __rw_is_const : __rw_true_type +{ +}; template struct __rw_is_volatile : __rw_false_type @@ -68,6 +121,9 @@ { }; +#endif + +#define _RWSTD_IS_CONST(T) _RW::__rw_is_const::value #define _RWSTD_IS_VOLATILE(T) _RW::__rw_is_volatile::value