summaryrefslogtreecommitdiff
path: root/libdw/c++/dwarf
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/c++/dwarf')
-rw-r--r--libdw/c++/dwarf26
1 files changed, 18 insertions, 8 deletions
diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf
index 61d9f8da..13257421 100644
--- a/libdw/c++/dwarf
+++ b/libdw/c++/dwarf
@@ -946,7 +946,10 @@ namespace elfutils
typedef attr_value mapped_type;
typedef attribute value_type;
- static const bool ordered = false;
+ static inline bool ordered ()
+ {
+ return false;
+ }
inline attributes_type (const attributes_type &a)
: attributes_base (a)
@@ -1285,7 +1288,11 @@ namespace elfutils
typedef std::pair< ::Dwarf_Addr, ::Dwarf_Addr> key_type; // XXX reloc
typedef key_type value_type;
- static const bool ordered = false;
+ static inline bool ordered ()
+ {
+ return false;
+ }
+
inline bool canonical () const
{
return false;
@@ -2320,7 +2327,10 @@ namespace elfutils
typedef _base::iterator iterator;
typedef _base::const_iterator const_iterator;
- static const bool ordered = true;
+ static inline bool ordered ()
+ {
+ return true;
+ }
struct hasher : public subr::container_hasher<arange_list> {};
@@ -2377,7 +2387,7 @@ namespace elfutils
// Since we are not const, coalesce in place.
coalesce (*this);
- if (list::ordered && other.canonical ()
+ if (list::ordered () && other.canonical ()
&& size () != other.size ())
return false;
@@ -2386,13 +2396,13 @@ namespace elfutils
return true;
// If he was sorted and canonical and we didn't match, it's conclusive.
- if (list::ordered && other.canonical ())
+ if (list::ordered () && other.canonical ())
return false;
// Make a sorted and canonicalized copy to compare to.
_base his (other);
if (size () > his.size ()
- || (list::ordered && size () == his.size ()))
+ || (list::ordered () && size () == his.size ()))
// Coalescing can only make him smaller.
return false;
coalesce (his);
@@ -2402,7 +2412,7 @@ namespace elfutils
template<typename list>
inline bool operator== (const list &other) const
{
- if (list::ordered && other.canonical ()
+ if (list::ordered () && other.canonical ()
&& size () < other.size ())
// Coalescing can only make us smaller.
return false;
@@ -2412,7 +2422,7 @@ namespace elfutils
return true;
// Make a non-const copy that will coalesce in its operator==.
- if (list::ordered && other.canonical ())
+ if (list::ordered () && other.canonical ())
return size () != other.size () && arange_list (*this) == other;
return arange_list (other) == *this;