|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70157 - in sandbox/enums/boost/enums: containers mpl ordinal scoped
From: vicente.botet_at_[hidden]
Date: 2011-03-18 18:16:09
Author: viboes
Date: 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
New Revision: 70157
URL: http://svn.boost.org/trac/boost/changeset/70157
Log:
Enums: rename enum_type by native_type
Text files modified:
sandbox/enums/boost/enums/containers/enum_array.hpp | 10 +++++-----
sandbox/enums/boost/enums/mpl/enum_c.hpp | 6 +++---
sandbox/enums/boost/enums/ordinal/first.hpp | 2 +-
sandbox/enums/boost/enums/ordinal/last.hpp | 2 +-
sandbox/enums/boost/enums/ordinal/linear_traiter.hpp | 2 +-
sandbox/enums/boost/enums/ordinal/pos.hpp | 2 +-
sandbox/enums/boost/enums/ordinal/pred.hpp | 4 ++--
sandbox/enums/boost/enums/ordinal/succ.hpp | 4 ++--
sandbox/enums/boost/enums/ordinal/val.hpp | 2 +-
sandbox/enums/boost/enums/scoped/emulation.hpp | 20 ++++++++++----------
sandbox/enums/boost/enums/scoped/enum_class_cons.hpp | 4 ++--
sandbox/enums/boost/enums/scoped/enum_class_no_cons.hpp | 4 ++--
sandbox/enums/boost/enums/scoped/enum_type_cons.hpp | 4 ++--
sandbox/enums/boost/enums/scoped/enum_type_no_cons.hpp | 4 ++--
sandbox/enums/boost/enums/scoped/native_type.hpp | 2 +-
sandbox/enums/boost/enums/scoped/native_value.hpp | 4 ++--
16 files changed, 38 insertions(+), 38 deletions(-)
Modified: sandbox/enums/boost/enums/containers/enum_array.hpp
==============================================================================
--- sandbox/enums/boost/enums/containers/enum_array.hpp (original)
+++ sandbox/enums/boost/enums/containers/enum_array.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -435,21 +435,21 @@
: public integral_constant<size_t, meta::size<EC>::value>
{};
- template <class T, typename EC, enum_type<EC>::type K>
+ template <class T, typename EC, native_type<EC>::type K>
class tuple_element<enum_array<T, EC> >
{
public:
typedef T type;
};
- template <class T, typename EC, enum_type<EC>::type K>
+ template <class T, typename EC, native_type<EC>::type K>
class tuple_element<const enum_array<T, EC> >
{
public:
typedef const T type;
};
- template <class T, typename EC, enum_type<EC>::type K>
+ template <class T, typename EC, native_type<EC>::type K>
inline
T&
get(enum_array<T, EC>& a)
@@ -457,7 +457,7 @@
return a[K];
}
- template <class T, typename EC, enum_type<EC>::type K>
+ template <class T, typename EC, native_type<EC>::type K>
inline
const T&
get(const enum_array<T, EC>& a)
@@ -467,7 +467,7 @@
#ifndef BOOST_NO_RVALUE_REFERENCES
- template <class T, typename EC, enum_type<EC>::type K>
+ template <class T, typename EC, native_type<EC>::type K>
T&&
get(array<T, meta::size<EC>::value>&& a)
{
Modified: sandbox/enums/boost/enums/mpl/enum_c.hpp
==============================================================================
--- sandbox/enums/boost/enums/mpl/enum_c.hpp (original)
+++ sandbox/enums/boost/enums/mpl/enum_c.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -20,12 +20,12 @@
namespace boost {
namespace mpl {
- template <typename EC, typename enums::enum_type<EC>::type V>
+ template <typename EC, typename enums::native_type<EC>::type V>
struct enum_c {
typedef enum_c_tag tag;
- BOOST_STATIC_CONSTEXPR typename enums::enum_type<EC>::type value = V;
+ BOOST_STATIC_CONSTEXPR typename enums::native_type<EC>::type value = V;
typedef enum_c type;
- typedef typename enums::enum_type<EC>::type value_type;
+ typedef typename enums::native_type<EC>::type value_type;
typedef typename enums::underlying_type<EC>::type underlying_type;
operator value_type() const { return this->value; }
};
Modified: sandbox/enums/boost/enums/ordinal/first.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/first.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/first.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -27,7 +27,7 @@
template <typename EC>
struct first
{
- BOOST_STATIC_CONSTEXPR typename enum_type<EC>::type value = enums::meta::val<EC,0>::value;
+ BOOST_STATIC_CONSTEXPR typename native_type<EC>::type value = enums::meta::val<EC,0>::value;
};
}
//! Returns the the first element of an enumeration
Modified: sandbox/enums/boost/enums/ordinal/last.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/last.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/last.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -34,7 +34,7 @@
template <typename EC>
struct last
{
- BOOST_STATIC_CONSTEXPR typename enum_type<EC>::type value = val<EC,size<EC>::value-1>::value;
+ BOOST_STATIC_CONSTEXPR typename native_type<EC>::type value = val<EC,size<EC>::value-1>::value;
};
}
//! Returns the the last element of an enumeration
Modified: sandbox/enums/boost/enums/ordinal/linear_traiter.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/linear_traiter.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/linear_traiter.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -76,7 +76,7 @@
// public:
// static std::size_t pos(EC e)
// {
-// return (enum_value(e));
+// return (native_value(e));
// }
// static EC val(std::size_t i)
// {
Modified: sandbox/enums/boost/enums/ordinal/pos.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/pos.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/pos.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -36,7 +36,7 @@
//! its relative position.
//! \note This meta-function must be specialized for each element of the enumeration.
- template <typename EC, typename enum_type<EC>::type V>
+ template <typename EC, typename native_type<EC>::type V>
#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
struct pos;
#else
Modified: sandbox/enums/boost/enums/ordinal/pred.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/pred.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/pred.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -34,11 +34,11 @@
{
//! meta-function that gets the predecessor of an enumeration element
//! Pre-condition: the position must be not 0
- template <typename EC, typename enum_type<EC>::type V>
+ template <typename EC, typename native_type<EC>::type V>
struct pred
{
BOOST_STATIC_ASSERT((pos<EC,V>::value!=0));
- BOOST_STATIC_CONSTEXPR typename enum_type<EC>::type value =
+ BOOST_STATIC_CONSTEXPR typename native_type<EC>::type value =
val<EC,pos<EC,V>::value-1>::value;
};
}
Modified: sandbox/enums/boost/enums/ordinal/succ.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/succ.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/succ.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -34,11 +34,11 @@
{
//! meta-function that gets the successor of an enumeration element
//! Pre-condition: the position must not be the last one
- template <typename EC, typename enum_type<EC>::type V>
+ template <typename EC, typename native_type<EC>::type V>
struct succ
{
BOOST_STATIC_ASSERT((pos<EC,V>::value!=(size<EC>::value-1)));
- static const typename enum_type<EC>::type value =
+ static const typename native_type<EC>::type value =
val<EC,pos<EC,V>::value+1>::value;
};
}
Modified: sandbox/enums/boost/enums/ordinal/val.hpp
==============================================================================
--- sandbox/enums/boost/enums/ordinal/val.hpp (original)
+++ sandbox/enums/boost/enums/ordinal/val.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -41,7 +41,7 @@
#else
struct val
{
- constexpr typename enum_type<EC>::type value=<to be defined for each specialization>;
+ constexpr typename native_type<EC>::type value=<to be defined for each specialization>;
};
#endif
Modified: sandbox/enums/boost/enums/scoped/emulation.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/emulation.hpp (original)
+++ sandbox/enums/boost/enums/scoped/emulation.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -38,13 +38,13 @@
#define BOOST_ENUMS_DETAIL_BINARY_OPERATOR(EC, UT, OP) \
friend inline BOOST_CONSTEXPR bool operator OP(EC lhs, EC rhs) { \
- return lhs.enum_value() OP rhs.enum_value(); \
+ return lhs.native_value() OP rhs.native_value(); \
} \
friend inline BOOST_CONSTEXPR bool operator OP(type lhs, EC rhs) { \
- return lhs OP rhs.enum_value(); \
+ return lhs OP rhs.native_value(); \
} \
friend inline BOOST_CONSTEXPR bool operator OP(EC lhs, type rhs) { \
- return lhs.enum_value() OP rhs; \
+ return lhs.native_value() OP rhs; \
}
#endif // BOOST_NO_SCOPED_ENUMS
@@ -69,7 +69,7 @@
namespace boost { \
namespace enums { \
template <> \
- struct scoping_type<enum_type<EC>::type> \
+ struct scoping_type<native_type<EC>::type> \
{ \
typedef EC type; \
}; \
@@ -105,7 +105,7 @@
{ \
return EC(v); \
} \
- inline EC convert_to(boost::enums::enum_type<EC>::type v \
+ inline EC convert_to(boost::enums::native_type<EC>::type v \
, boost::dummy::type_tag<EC> const& \
) \
{ \
@@ -145,7 +145,7 @@
{ \
return EC::convert_to(v); \
} \
- inline friend EC convert_to(boost::enums::enum_type<EC>::type v \
+ inline friend EC convert_to(boost::enums::native_type<EC>::type v \
, boost::dummy::type_tag<EC> const& \
) \
{ \
@@ -157,11 +157,11 @@
{ \
return boost::enums::underlying_value(v); \
} \
- inline friend boost::enums::enum_type<EC>::type convert_to(EC v \
- , boost::dummy::type_tag<boost::enums::enum_type<EC>::type> const& \
+ inline friend boost::enums::native_type<EC>::type convert_to(EC v \
+ , boost::dummy::type_tag<boost::enums::native_type<EC>::type> const& \
) \
{ \
- return boost::enums::enum_value(v); \
+ return boost::enums::native_value(v); \
}
@@ -188,7 +188,7 @@
res.val_=static_cast<underlying_type>(v); \
return res; \
} \
- type enum_value() const \
+ type native_value() const \
{ \
return type(val_); \
} \
Modified: sandbox/enums/boost/enums/scoped/enum_class_cons.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/enum_class_cons.hpp (original)
+++ sandbox/enums/boost/enums/scoped/enum_class_cons.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -91,7 +91,7 @@
return res;
}
//! explicit conversion function to enum type
- type enum_value() const
+ type native_value() const
{
return type(val_);
}
@@ -222,7 +222,7 @@
friend type convert_to(enum_class_cons v,
boost::dummy::type_tag<type> const&)
{
- return boost::enums::enum_value(v);
+ return boost::enums::native_value(v);
}
};
}
Modified: sandbox/enums/boost/enums/scoped/enum_class_no_cons.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/enum_class_no_cons.hpp (original)
+++ sandbox/enums/boost/enums/scoped/enum_class_no_cons.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -79,7 +79,7 @@
}
//! explicit conversion function to enum type
- type enum_value() const
+ type native_value() const
{
return type(val_);
}
@@ -210,7 +210,7 @@
friend type convert_to(enum_class_no_cons v,
boost::dummy::type_tag<type> const&)
{
- return boost::enums::enum_value(v);
+ return boost::enums::native_value(v);
}
};
}
Modified: sandbox/enums/boost/enums/scoped/enum_type_cons.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/enum_type_cons.hpp (original)
+++ sandbox/enums/boost/enums/scoped/enum_type_cons.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -108,7 +108,7 @@
}
//! explicit conversion function to enum type
- type enum_value() const
+ type native_value() const
{
return type(val_);
}
@@ -241,7 +241,7 @@
friend type convert_to(enum_type_cons v,
boost::dummy::type_tag<type> const&)
{
- return boost::enums::enum_value(v);
+ return boost::enums::native_value(v);
}
};
}
Modified: sandbox/enums/boost/enums/scoped/enum_type_no_cons.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/enum_type_no_cons.hpp (original)
+++ sandbox/enums/boost/enums/scoped/enum_type_no_cons.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -93,7 +93,7 @@
return res;
}
//! explicit conversion function to enum type
- type enum_value() const
+ type native_value() const
{
return type(val_);
}
@@ -225,7 +225,7 @@
friend type convert_to(enum_type_no_cons v,
boost::dummy::type_tag<type> const&)
{
- return boost::enums::enum_value(v);
+ return boost::enums::native_value(v);
}
};
}
Modified: sandbox/enums/boost/enums/scoped/native_type.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/native_type.hpp (original)
+++ sandbox/enums/boost/enums/scoped/native_type.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -22,7 +22,7 @@
//! meta-function to get the native enum type associated to an enum class
//! or its emulation
template <typename EC>
- struct enum_type
+ struct native_type
{
#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
#ifdef BOOST_NO_SCOPED_ENUMS
Modified: sandbox/enums/boost/enums/scoped/native_value.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/native_value.hpp (original)
+++ sandbox/enums/boost/enums/scoped/native_value.hpp 2011-03-18 18:16:05 EDT (Fri, 18 Mar 2011)
@@ -21,10 +21,10 @@
template <typename EC>
inline
- typename enum_type<EC>::type enum_value(EC e)
+ typename native_type<EC>::type native_value(EC e)
{
#ifdef BOOST_NO_SCOPED_ENUMS
- return e.enum_value();
+ return e.native_value();
#else
return e;
#endif
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