aboutsummaryrefslogtreecommitdiff
path: root/src/rt/util/indexed_list.h
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-09-07 18:22:03 -0700
committerMichael Bebenita <[email protected]>2010-09-07 18:41:08 -0700
commit5375b3916095970bc87675969b2fb00d9bebcfd8 (patch)
tree047e13e64c48dfcf26268a2bd125f1645d660301 /src/rt/util/indexed_list.h
parentChange signature of array_list::pop(). (diff)
downloadrust-5375b3916095970bc87675969b2fb00d9bebcfd8.tar.xz
rust-5375b3916095970bc87675969b2fb00d9bebcfd8.zip
Small updates to util classes.
Diffstat (limited to 'src/rt/util/indexed_list.h')
-rw-r--r--src/rt/util/indexed_list.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rt/util/indexed_list.h b/src/rt/util/indexed_list.h
index cd39a0b6..b93945cc 100644
--- a/src/rt/util/indexed_list.h
+++ b/src/rt/util/indexed_list.h
@@ -10,6 +10,15 @@ public:
int32_t list_index;
};
+template<typename T>
+class indexed_list_element : public indexed_list_object {
+public:
+ T value;
+ indexed_list_element(T value) : value(value) {
+ // Nop;
+ }
+};
+
/**
* An array list of objects that are aware of their position in the list.
* Normally, objects in this list should derive from the base class