mirror of
https://github.com/boostorg/python.git
synced 2026-01-28 07:22:31 +00:00
Renamed IndexStyle to index_style_t
[SVN r20506]
This commit is contained in:
@@ -160,7 +160,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
typedef typename boost::call_traits<key_type>::param_type key_param;
|
||||
typedef typename boost::call_traits<index_type>::param_type index_param;
|
||||
|
||||
BOOST_STATIC_CONSTANT (IndexStyle, index_style = index_style_nonlinear);
|
||||
BOOST_STATIC_CONSTANT (index_style_t, index_style = index_style_nonlinear);
|
||||
BOOST_STATIC_CONSTANT (bool, has_find = true);
|
||||
|
||||
BOOST_STATIC_CONSTANT (bool, has_mutable_ref = false);
|
||||
@@ -186,7 +186,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
typedef typename boost::call_traits<key_type>::param_type key_param;
|
||||
typedef typename boost::call_traits<index_type>::param_type index_param;
|
||||
|
||||
BOOST_STATIC_CONSTANT (IndexStyle, index_style = index_style_nonlinear);
|
||||
BOOST_STATIC_CONSTANT (index_style_t, index_style = index_style_nonlinear);
|
||||
BOOST_STATIC_CONSTANT (bool, has_find = true);
|
||||
BOOST_STATIC_CONSTANT (bool, is_reorderable = false);
|
||||
// std::map::reference (reference to the mapped type) is mutable,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace boost { namespace python { namespace indexing {
|
||||
#if !BOOST_MSVC
|
||||
enum IndexStyle {
|
||||
enum index_style_t {
|
||||
index_style_none // No random access (iteration only)
|
||||
, index_style_nonlinear // Random access by key (no slicing)
|
||||
, index_style_linear // Random access by integer index (allows slicing)
|
||||
@@ -42,10 +42,10 @@ namespace boost { namespace python { namespace indexing {
|
||||
// like (traits::index_style == index_style_linear) is a
|
||||
// compile-time constant. However, the problem doesn't exist for
|
||||
// int.
|
||||
typedef int IndexStyle;
|
||||
IndexStyle const index_style_none = 0;
|
||||
IndexStyle const index_style_nonlinear = 1;
|
||||
IndexStyle const index_style_linear = 2;
|
||||
typedef int index_style_t;
|
||||
index_style_t const index_style_none = 0;
|
||||
index_style_t const index_style_nonlinear = 1;
|
||||
index_style_t const index_style_linear = 2;
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -69,7 +69,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
BOOST_STATIC_CONSTANT (
|
||||
bool, has_mutable_ref = is_mutable_ref<reference>::value);
|
||||
|
||||
BOOST_STATIC_CONSTANT (IndexStyle, index_style = index_style_none);
|
||||
BOOST_STATIC_CONSTANT (index_style_t, index_style = index_style_none);
|
||||
};
|
||||
|
||||
template<typename Iterator>
|
||||
@@ -91,7 +91,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
struct random_access_iterator_traits
|
||||
: public bidirectional_iterator_traits<Iterator>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT (IndexStyle, index_style = index_style_linear);
|
||||
BOOST_STATIC_CONSTANT (index_style_t, index_style = index_style_linear);
|
||||
};
|
||||
|
||||
namespace iterator_detail {
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
// __getitem__ dummy
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<IndexStyle>
|
||||
template<index_style_t style>
|
||||
struct maybe_add_getitem {
|
||||
template<class PythonClass, class Algorithms, class Policy>
|
||||
static void apply (PythonClass &, Algorithms const &, Policy const &) { }
|
||||
@@ -121,7 +121,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
// __setitem__ dummy
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<bool doit, IndexStyle style>
|
||||
template<bool doit, index_style_t style>
|
||||
struct maybe_add_setitem {
|
||||
template<class PythonClass, class Algorithms, class Policy>
|
||||
static void apply (PythonClass &, Algorithms const &, Policy const &) { }
|
||||
@@ -166,7 +166,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
// __delitem__ dummy
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<bool doit, IndexStyle style>
|
||||
template<bool doit, index_style_t style>
|
||||
struct maybe_add_delitem {
|
||||
template<class PythonClass, class Algorithms, class Policy>
|
||||
static void apply (PythonClass &, Algorithms const &, Policy const &) { }
|
||||
@@ -402,7 +402,7 @@ namespace boost { namespace python { namespace indexing {
|
||||
// count dummy
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<bool doit, IndexStyle>
|
||||
template<bool doit, index_style_t style>
|
||||
struct maybe_add_count {
|
||||
template<class PythonClass, class Algorithms, class Policy>
|
||||
static void apply (PythonClass &, Algorithms const &, Policy const &) { }
|
||||
|
||||
Reference in New Issue
Block a user