summaryrefslogtreecommitdiff
path: root/modules/codec/c++/id_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec/c++/id_map.hpp')
-rw-r--r--modules/codec/c++/id_map.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/codec/c++/id_map.hpp b/modules/codec/c++/id_map.hpp
index bb31846..84c04e7 100644
--- a/modules/codec/c++/id_map.hpp
+++ b/modules/codec/c++/id_map.hpp
@@ -13,13 +13,13 @@ namespace saw {
* Insert - O(1)
* Erase - O(n) ? Dunno
*/
-template<typename T, typename Encoding>
+template<typename T, typename Encoding, typename Storage>
class id_map final {
private:
/**
* Container which stores the primary data
*/
- std::vector<data<T,Encoding>> data_;
+ std::vector<data<T,Encoding,Storage>> data_;
/**
* Container which tracks free'd/fragmented elements within the
* main container
@@ -65,7 +65,7 @@ public:
* Inserts an element into the container and returns either an id on success
* or an error on failure.
*/
- error_or<id<T>> insert(data<T,Encoding> val) noexcept {
+ error_or<id<T>> insert(data<T,Encoding,Storage> val) noexcept {
/// @todo Fix size_t and id base type
if(free_ids_.empty()){
try {
@@ -145,7 +145,7 @@ public:
* Returns an error on failure and returns
* a value pointer on success.
*/
- error_or<data<T,Encoding>*> find(const id<T>& val){
+ error_or<data<T,Encoding,Storage>*> find(const id<T>& val){
if(val.get_value() >= data_.size()){
return make_error<err::not_found>("ID is too large");
}