|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-05-29 17:17:29
Author: eric_niebler
Date: 2008-05-29 17:17:29 EDT (Thu, 29 May 2008)
New Revision: 45924
URL: http://svn.boost.org/trac/boost/changeset/45924
Log:
better work around std::map::op[] strangeness
Text files modified:
branches/proto/v4/boost/proto/detail/decltype.hpp | 116 +++++++++++++++++++++------------------
1 files changed, 61 insertions(+), 55 deletions(-)
Modified: branches/proto/v4/boost/proto/detail/decltype.hpp
==============================================================================
--- branches/proto/v4/boost/proto/detail/decltype.hpp (original)
+++ branches/proto/v4/boost/proto/detail/decltype.hpp 2008-05-29 17:17:29 EDT (Thu, 29 May 2008)
@@ -62,62 +62,68 @@
{
namespace detail
{
- ////////////////////////////////////////////////////////////////////////////////////////////
- struct any
+ namespace anyns
{
- any(...);
- any operator=(any);
- any operator[](any);
- #define M0(Z, N, DATA) any operator()(BOOST_PP_ENUM_PARAMS_Z(Z, N, any BOOST_PP_INTERCEPT));
- BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, M0, ~)
- #undef M0
-
- operator int any::*();
-
- any operator+();
- any operator-();
- any operator*();
- any operator&();
- any operator~();
- any operator!();
- any operator++();
- any operator--();
- any operator++(int);
- any operator--(int);
-
- any operator<<(any);
- any operator>>(any);
- any operator*(any);
- any operator/(any);
- any operator%(any);
- any operator+(any);
- any operator-(any);
- any operator<(any);
- any operator>(any);
- any operator<=(any);
- any operator>=(any);
- any operator==(any);
- any operator!=(any);
- any operator||(any);
- any operator&&(any);
- any operator&(any);
- any operator|(any);
- any operator^(any);
- any operator,(any);
- any operator->*(any);
-
- any operator<<=(any);
- any operator>>=(any);
- any operator*=(any);
- any operator/=(any);
- any operator%=(any);
- any operator+=(any);
- any operator-=(any);
- any operator&=(any);
- any operator|=(any);
- any operator^=(any);
- };
-
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ struct any
+ {
+ any(...);
+ any operator=(any);
+ any operator[](any);
+ #define M0(Z, N, DATA) any operator()(BOOST_PP_ENUM_PARAMS_Z(Z, N, any BOOST_PP_INTERCEPT));
+ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, M0, ~)
+ #undef M0
+
+ template<typename T>
+ operator T &() const volatile;
+
+ any operator+();
+ any operator-();
+ any operator*();
+ any operator&();
+ any operator~();
+ any operator!();
+ any operator++();
+ any operator--();
+ any operator++(int);
+ any operator--(int);
+
+ friend any operator<<(any, any);
+ friend any operator>>(any, any);
+ friend any operator*(any, any);
+ friend any operator/(any, any);
+ friend any operator%(any, any);
+ friend any operator+(any, any);
+ friend any operator-(any, any);
+ friend any operator<(any, any);
+ friend any operator>(any, any);
+ friend any operator<=(any, any);
+ friend any operator>=(any, any);
+ friend any operator==(any, any);
+ friend any operator!=(any, any);
+ friend any operator||(any, any);
+ friend any operator&&(any, any);
+ friend any operator&(any, any);
+ friend any operator|(any, any);
+ friend any operator^(any, any);
+ friend any operator,(any, any);
+ friend any operator->*(any, any);
+
+ friend any operator<<=(any, any);
+ friend any operator>>=(any, any);
+ friend any operator*=(any, any);
+ friend any operator/=(any, any);
+ friend any operator%=(any, any);
+ friend any operator+=(any, any);
+ friend any operator-=(any, any);
+ friend any operator&=(any, any);
+ friend any operator|=(any, any);
+ friend any operator^=(any, any);
+ };
+ }
+
+ using anyns::any;
+
////////////////////////////////////////////////////////////////////////////////////////////
template<typename T>
struct as_mutable
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