Compare commits

..

51 Commits

Author SHA1 Message Date
edcea5d276 This commit was manufactured by cvs2svn to create branch 'split-config'.
[SVN r10742]
2001-08-04 14:31:38 +00:00
81e3df2b36 changed _MSC_VER to BOOST_MSVC
[SVN r10705]
2001-07-25 19:38:41 +00:00
ac05307515 added "Traversal" to the names
[SVN r10297]
2001-06-08 17:05:37 +00:00
552a1e6785 replaced by iterator_categories.htm
[SVN r10296]
2001-06-08 16:58:44 +00:00
134b8b51aa updated
[SVN r10295]
2001-06-08 15:37:16 +00:00
efecfd17b9 updated to match working group paper
[SVN r10294]
2001-06-08 15:36:30 +00:00
799158841e this is the original
[SVN r10293]
2001-06-08 15:17:14 +00:00
582ebfd054 updated to match changes in the headers
[SVN r10260]
2001-06-03 21:07:46 +00:00
42e4db1539 updated to match my paper to the committee
[SVN r10259]
2001-06-03 21:06:49 +00:00
d7023154a3 Fix broken hyperlinks
[SVN r9980]
2001-04-25 13:22:53 +00:00
9582b2223c Change all eGroups references to YahooGroups
[SVN r9979]
2001-04-25 00:24:50 +00:00
d7908fb81f added public before the typedef for "type" in non_bidirectional_category
[SVN r9711]
2001-04-05 02:32:00 +00:00
e48cdcb94f blah
[SVN r9588]
2001-03-19 19:35:51 +00:00
0846ad5fd0 added links to iterator_traits.htm
[SVN r9587]
2001-03-19 18:05:17 +00:00
84663ff2e2 added more doc
[SVN r9586]
2001-03-19 18:01:41 +00:00
6de1934420 new file
[SVN r9585]
2001-03-19 17:41:49 +00:00
a110b9fd27 new files
[SVN r9578]
2001-03-18 19:06:33 +00:00
eb06c122d1 rigged new iterator_traits for backward compatibility
[SVN r9577]
2001-03-18 18:37:49 +00:00
cbbe851adb VC++ workaround: the forward_iterator real ref check is not working
[SVN r9499]
2001-03-08 20:01:35 +00:00
f6cc2e520f parameters following a named parameter list must get their types from
the named parameter list and not use the default


[SVN r9496]
2001-03-08 19:03:44 +00:00
4e29b5aa29 removed some #if 0's
[SVN r9491]
2001-03-08 17:01:25 +00:00
d924f56ad8 added support for optional named template parameters
[SVN r9487]
2001-03-08 16:33:14 +00:00
f27fd095f7 new file, part of the iterator adaptors library
[SVN r9350]
2001-02-27 05:49:55 +00:00
d22edf735a put policies type in private
[SVN r9290]
2001-02-20 16:00:21 +00:00
af8dd117d5 Rolled back reverse_iterator_pair_generator again, as it doesn't save typing on a conforming compiler
[SVN r9279]
2001-02-19 20:41:22 +00:00
149d07cda0 Fix missing comma bug
[SVN r9274]
2001-02-19 16:22:03 +00:00
e9d9bdbb10 Reinstated reverse_iterator_pair_generator
[SVN r9264]
2001-02-18 22:21:14 +00:00
8d8f828da5 changes to order of indirect_iterator_generator param list
[SVN r9246]
2001-02-17 22:03:06 +00:00
fc15f5f710 added Category parameter to the indirect iterator
[SVN r9240]
2001-02-17 19:59:54 +00:00
ef66d28b19 added "explicit" to iterator_adaptor constructor
[SVN r9234]
2001-02-17 01:44:41 +00:00
0c8d74863f Add an implicit conversion operator to operator_arrow_proxy as CW and BCC workarounds.
[SVN r9233]
2001-02-16 23:06:57 +00:00
1c73f1f2ae made filter_iterator_generator::policies_type public
[SVN r9230]
2001-02-16 21:27:26 +00:00
ee20a630dd Remove implication that a type generator may only generate a single type
[SVN r9221]
2001-02-16 05:24:45 +00:00
c2472221ef made the typedef policies_type public in iterator_adaptor
and private in filter_iterator_generator


[SVN r9205]
2001-02-15 06:07:00 +00:00
bf45977491 removed unnecessary typedefs from counting_iterator_traits
[SVN r9203]
2001-02-15 05:51:40 +00:00
1988994bd3 added dummy_constructor to dummyT so it can be used in concept archetypes
[SVN r9181]
2001-02-13 02:03:59 +00:00
5482763a93 added missing const qualifier
[SVN r9148]
2001-02-12 04:45:02 +00:00
2c2a3eab21 Use new iterator_adaptor interface, Fixes for Borland.
[SVN r9131]
2001-02-11 19:36:43 +00:00
dca20fae75 Use BOOST_STATIC_CONSTANT
[SVN r9129]
2001-02-11 19:33:47 +00:00
e3aaf2cc91 Switch to use of BOOST_STATIC_CONSTANT where possible
[SVN r9127]
2001-02-11 19:29:28 +00:00
ea4c7c7dd9 Removed workaround for older MIPSpro compiler. The workaround was
preventing the proper functionality of the underlying iterator being
carried forward into the iterator adaptor.

Also added is_bidirectional enum to avoid EDG compiler error.


[SVN r9123]
2001-02-11 18:57:31 +00:00
fd6ba58d5e Borland fixes up the wazoo. It finally works!
[SVN r9114]
2001-02-11 16:09:22 +00:00
268e70faa1 Reinstate one of John's fixes
[SVN r9113]
2001-02-11 16:06:12 +00:00
170b44763d Clean up after John Maddocks's (finally effective!) Borland fixes
[SVN r9111]
2001-02-11 14:07:11 +00:00
b2701f9f78 Borland compiler fixes
[SVN r9110]
2001-02-11 12:50:06 +00:00
ad4c5ab089 Use new iterator_adaptor<> interface
[SVN r9106]
2001-02-11 03:10:01 +00:00
c585adde71 Removed traits argument from iterator_adaptor<> and switched to explicit trait
specification for maximum ease-of-use.

Added comments to detail::iterator_defaults<>

Began using detail::iterator_defaults<> unconditionally for code clarity

Changed uses of `Iterator' to `Base' where non-iterators can be used.


[SVN r9104]
2001-02-11 03:05:50 +00:00
c5f24d0d72 A baby step that worked.
[SVN r9095]
2001-02-10 23:14:42 +00:00
dbb99b1cf3 Rolled in supposed Borland fixes from John Maddock, but not seeing any improvement yet
[SVN r9093]
2001-02-10 20:23:35 +00:00
be44a4714b Rolled in supposed Borland fixes from John Maddock, but not seeing any
improvement yet

Changed argument order to indirect_ generator, for convenience in the case of
input iterators (where Reference must be a value type).

Removed derivation of filter_iterator_policies from default_iterator_policies,
since the iterator category is likely to be reduced (we don't want to allow
illegal operations like decrement).

Support for a simpler filter iterator interface.


[SVN r9092]
2001-02-10 20:22:05 +00:00
e9f24023d4 completely removed constructor that was #if 0'd
[SVN r9076]
2001-02-10 17:57:51 +00:00
8 changed files with 641 additions and 725 deletions

View File

@ -1,282 +0,0 @@
#ifndef BOOST_ITERATOR_CONCEPTS_HPP
#define BOOST_ITERATOR_CONCEPTS_HPP
#include <boost/concept_check.hpp>
#include <boost/iterator_traits.hpp>
namespace boost_concepts {
// Used a different namespace here (instead of "boost") so that the
// concept descriptions do not take for granted the names in
// namespace boost.
//===========================================================================
template <typename Iterator>
class ReadableIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::return_category
return_category;
void constraints() {
boost::function_requires< boost::SGIAssignableConcept<Iterator> >();
boost::function_requires< boost::EqualityComparableConcept<Iterator> >();
boost::function_requires< boost::DefaultConstructibleConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<return_category, boost::readable_iterator_tag> >();
reference r = *i; // or perhaps read(x)
value_type v(r);
boost::ignore_unused_variable_warning(v);
}
Iterator i;
};
template <typename Iterator, typename ValueType>
class WritableIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::return_category
return_category;
void constraints() {
boost::function_requires< boost::SGIAssignableConcept<Iterator> >();
boost::function_requires< boost::EqualityComparableConcept<Iterator> >();
boost::function_requires< boost::DefaultConstructibleConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<return_category, boost::writable_iterator_tag> >();
*i = v; // an alternative could be something like write(x, v)
}
ValueType v;
Iterator i;
};
template <typename Iterator>
class ConstantLvalueIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::return_category
return_category;
void constraints() {
boost::function_requires< ReadableIteratorConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<return_category,
boost::constant_lvalue_iterator_tag> >();
typedef typename boost::require_same<reference, const value_type&>::type req;
reference v = *i;
boost::ignore_unused_variable_warning(v);
}
Iterator i;
};
template <typename Iterator>
class MutableLvalueIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::return_category
return_category;
void constraints() {
boost::function_requires< ReadableIteratorConcept<Iterator> >();
boost::function_requires< WritableIteratorConcept<Iterator, value_type> >();
boost::function_requires<
boost::ConvertibleConcept<return_category,
boost::constant_lvalue_iterator_tag> >();
typedef typename boost::require_same<reference, value_type&>::type req;
reference v = *i;
boost::ignore_unused_variable_warning(v);
}
Iterator i;
};
//===========================================================================
template <typename Iterator>
class SinglePassIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::motion_category
motion_category;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< boost::SGIAssignableConcept<Iterator> >();
boost::function_requires< boost::EqualityComparableConcept<Iterator> >();
boost::function_requires< boost::DefaultConstructibleConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<motion_category,
boost::single_pass_iterator_tag> >();
// difference_type must be a signed integral type
++i;
(void)i++;
}
Iterator i;
};
template <typename Iterator>
class ForwardIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::motion_category
motion_category;
void constraints() {
boost::function_requires< SinglePassIteratorConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<motion_category,
boost::forward_iterator_tag> >();
}
};
template <typename Iterator>
class BidirectionalIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::motion_category
motion_category;
void constraints() {
boost::function_requires< ForwardIteratorConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<motion_category,
boost::bidirectional_iterator_tag> >();
--i;
(void)i--;
}
Iterator i;
};
template <typename Iterator>
class RandomAccessIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::motion_category
motion_category;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< BidirectionalIteratorConcept<Iterator> >();
boost::function_requires<
boost::ConvertibleConcept<motion_category,
boost::random_access_iterator_tag> >();
i += n;
i = i + n;
i = n + i;
i -= n;
i = i - n;
n = i - j;
}
difference_type n;
Iterator i, j;
};
//===========================================================================
template <typename Iterator>
class ReadableRandomAccessIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< RandomAccessIteratorConcept<Iterator> >();
boost::function_requires< ReadableIteratorConcept<Iterator> >();
reference r = i[n];
value_type v(r);
boost::ignore_unused_variable_warning(v);
}
difference_type n;
Iterator i;
};
template <typename Iterator>
class WritableRandomAccessIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< RandomAccessIteratorConcept<Iterator> >();
boost::function_requires< WritableIteratorConcept<Iterator, value_type> >();
i[n] = v;
boost::ignore_unused_variable_warning(v);
}
difference_type n;
value_type v;
Iterator i;
};
template <typename Iterator>
class ConstantLvalueRandomAccessIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< RandomAccessIteratorConcept<Iterator> >();
boost::function_requires< ReadableIteratorConcept<Iterator> >();
typedef typename boost::require_same<reference, const value_type&>::type req;
reference v = i[n];
boost::ignore_unused_variable_warning(v);
}
difference_type n;
value_type v;
Iterator i;
};
template <typename Iterator>
class MutableLvalueRandomAccessIteratorConcept {
public:
typedef typename boost::iterator_traits<Iterator>::value_type value_type;
typedef typename boost::iterator_traits<Iterator>::reference reference;
typedef typename boost::iterator_traits<Iterator>::difference_type
difference_type;
void constraints() {
boost::function_requires< RandomAccessIteratorConcept<Iterator> >();
boost::function_requires< WritableIteratorConcept<Iterator, value_type> >();
boost::function_requires< ReadableIteratorConcept<Iterator> >();
typedef typename boost::require_same<reference, value_type&>::type req;
reference v = i[n];
boost::ignore_unused_variable_warning(v);
}
difference_type n;
value_type v;
Iterator i;
};
} // namespace boost_concepts
#endif // BOOST_ITERATOR_CONCEPTS_HPP

View File

@ -1,60 +0,0 @@
#ifndef BOOST_ITERATOR_TRAITS_HPP
#define BOOST_ITERATOR_TRAITS_HPP
#include <boost/config.hpp>
#include <boost/type_traits.hpp>
namespace boost {
template <typename Iterator>
struct iterator_traits {
typedef typename Iterator::value_type value_type;
typedef typename Iterator::reference reference;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::return_category return_category;
typedef typename Iterator::motion_category motion_category;
};
// Motion Categories
struct single_pass_iterator_tag { };
struct forward_iterator_tag : public single_pass_iterator_tag { };
struct bidirectional_iterator_tag : public forward_iterator_tag { };
struct random_access_iterator_tag : public bidirectional_iterator_tag { };
// Return Type Categories
struct readable_iterator_tag { };
struct writable_iterator_tag { };
struct mutable_lvalue_iterator_tag : virtual public writable_iterator_tag,
virtual public readable_iterator_tag { };
struct constant_lvalue_iterator_tag : public readable_iterator_tag { };
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
namespace detail {
template <bool IsConst>
struct pointer_return_category {
typedef constant_lvalue_iterator_tag type;
};
template <>
struct pointer_return_category<false> {
typedef mutable_lvalue_iterator_tag type;
};
} // namespace detail
template <typename T>
struct iterator_traits<T*> {
typedef T value_type;
typedef T& reference;
typedef T* pointer;
typedef std::ptrdiff_t difference_type;
typedef typename detail::pointer_return_category<is_const<T>::value>::type
return_category;
typedef random_access_iterator_tag motion_category;
};
#endif
} // namespace boost
#endif // BOOST_ITERATOR_TRAITS_HPP

View File

@ -1,13 +0,0 @@
#include <boost/iterator_concepts.hpp>
int
main()
{
boost::function_requires<
boost_concepts::MutableLvalueRandomAccessIteratorConcept<int*> >();
boost::function_requires<
boost_concepts::ConstantLvalueRandomAccessIteratorConcept<const int*> >();
return 0;
}

View File

@ -28,6 +28,14 @@
// Incrementable.
//
// Revision History
// 14 Feb 2001 Removed unnecessary typedefs from counting_iterator_traits
// (Jeremy Siek)
// 11 Feb 2001 Use BOOST_STATIC_CONSTANT (Dave Abrahams)
// 11 Feb 2001 Clean up after John Maddocks's (finally effective!) Borland
// fixes (David Abrahams).
// 10 Feb 2001 Use new iterator_adaptor<> interface (David Abrahams)
// 10 Feb 2001 Rolled in supposed Borland fixes from John Maddock, but not
// seeing any improvement yet (David Abrahams)
// 09 Feb 2001 Factored out is_numeric computation. Borland still
// unhappy :( (David Abrahams)
// 08 Feb 2001 Beginning of a failed attempt to appease Borland
@ -126,15 +134,16 @@ namespace detail {
struct is_numeric {
// For a while, this wasn't true, but we rely on it below. This is a regression assert.
BOOST_STATIC_ASSERT(::boost::is_integral<char>::value);
enum { value =
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
std::numeric_limits<T>::is_specialized
#elif defined(__BORLANDC__)
::boost::is_integral<T>::value
#else
boost::is_convertible<int,T>::value && boost::is_convertible<T,int>::value
#endif
};
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<T>::is_specialized);
# else
# if !defined(__BORLANDC__)
BOOST_STATIC_CONSTANT(bool, value = (
boost::is_convertible<int,T>::value && boost::is_convertible<T,int>::value));
# else
BOOST_STATIC_CONSTANT(bool, value = ::boost::is_arithmetic<T>::value);
# endif
# endif
};
// Compute the distance over arbitrary numeric and/or iterator types
@ -152,14 +161,11 @@ namespace detail {
template <class Incrementable>
struct counting_iterator_traits {
private:
enum {numeric = detail::is_numeric<Incrementable>::value };
typedef typename detail::counting_iterator_traits_select<(
numeric
)>::template traits<Incrementable> traits;
typedef ::boost::detail::counting_iterator_traits_select<(
::boost::detail::is_numeric<Incrementable>::value
)> binder;
typedef typename binder::template traits<Incrementable> traits;
public:
typedef Incrementable value_type;
typedef const Incrementable& reference;
typedef const value_type* pointer;
typedef typename traits::difference_type difference_type;
typedef typename traits::iterator_category iterator_category;
};
@ -182,9 +188,16 @@ struct counting_iterator_policies : public default_iterator_policies
template <class Incrementable>
struct counting_iterator_generator
{
typedef counting_iterator_traits<Incrementable> traits;
typedef iterator_adaptor<Incrementable,
counting_iterator_policies<Incrementable>,
counting_iterator_traits<Incrementable> > type;
Incrementable,
const Incrementable&,
const Incrementable*,
typename traits::iterator_category,
typename traits::difference_type
> type;
};
// Manufacture a counting iterator for an arbitrary incrementable type
@ -192,9 +205,8 @@ template <class Incrementable>
inline typename counting_iterator_generator<Incrementable>::type
make_counting_iterator(Incrementable x)
{
return iterator_adaptor<Incrementable,
counting_iterator_policies<Incrementable>,
counting_iterator_traits<Incrementable> >(x);
typedef typename counting_iterator_generator<Incrementable>::type result_t;
return result_t(x);
}

View File

@ -0,0 +1,55 @@
// (C) Copyright Jeremy Siek 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
namespace boost {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator(const UnaryFunction& f = UnaryFunction())
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace boost
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -5,8 +5,10 @@
// for any purpose.
//
// Revision History:
// 04 Feb 2001 Support for user-defined iterator categories (David Abrahams)
// 30 Jan 2001 Initial Checkin (David Abrahams)
// 11 Feb 2001 Use new iterator_adaptor interface, Fixes for Borland.
// (Dave Abrahams)
// 04 Feb 2001 Support for user-defined iterator categories (Dave Abrahams)
// 30 Jan 2001 Initial Checkin (Dave Abrahams)
#ifndef BOOST_HALF_OPEN_RANGE_HPP_
# define BOOST_HALF_OPEN_RANGE_HPP_
@ -75,7 +77,7 @@ namespace detail {
static const Incrementable choose(const Incrementable& start, const Incrementable& finish)
{
return finish_chooser<(
boost::is_convertible<Category,std::random_access_iterator_tag>::value
::boost::is_convertible<Category*,std::random_access_iterator_tag*>::value
)>::template rebind<Incrementable>::choose(start, finish);
}
};
@ -85,16 +87,18 @@ namespace detail {
template <class Incrementable>
struct half_open_range
{
typedef iterator_adaptor<Incrementable,
counting_iterator_policies<Incrementable>,
counting_iterator_traits<Incrementable> > iterator;
typedef typename counting_iterator_generator<Incrementable>::type iterator;
private: // utility type definitions
// Using iter_t prevents compiler confusion with boost::iterator
typedef typename counting_iterator_generator<Incrementable>::type iter_t;
typedef std::less<Incrementable> less_value;
typedef typename boost::detail::iterator_traits<iterator>::iterator_category category;
typedef typename iter_t::iterator_category category;
typedef half_open_range<Incrementable> self;
public:
typedef iterator const_iterator;
typedef iter_t const_iterator;
typedef typename counting_iterator_traits<Incrementable>::value_type value_type;
typedef typename counting_iterator_traits<Incrementable>::difference_type difference_type;
typedef typename counting_iterator_traits<Incrementable>::reference reference;
@ -130,7 +134,14 @@ struct half_open_range
#endif
)
{}
half_open_range& operator=(const self& x)
{
m_start = x.m_start;
m_finish = x.m_finish;
return *this;
}
half_open_range& operator=(const std::pair<Incrementable,Incrementable>& x)
{
m_start = x.first;

File diff suppressed because it is too large Load Diff

View File

@ -15,12 +15,14 @@
# include <assert.h>
# include <boost/type_traits.hpp>
# include <boost/static_assert.hpp>
# include <boost/concept_archetype.hpp> // for detail::dummy_constructor
namespace boost {
// use this for the value type
struct dummyT {
dummyT() { }
dummyT(detail::dummy_constructor) { }
dummyT(int x) : m_x(x) { }
int foo() const { return m_x; }
bool operator==(const dummyT& d) const { return m_x == d.m_x; }