Skip to content

Commit

Permalink
#add insertorassign
Browse files Browse the repository at this point in the history
add opIndexAssign test
  • Loading branch information
Emmanuel Nyarko authored and Emmanuel Nyarko committed May 17, 2024
1 parent 1b717eb commit 27b87ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions extras/AssociativeContainers/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class Map
{
static Map<K,V>* make() {return new Map<K, V>(); }

/*void insertOrAssign(const K& key, const V& value)
void insertOrAssign(const K& key, const V& value)
{
this->map.insert_or_assign(key, value);
}
*/

std::map<K, V> map;
};
};
2 changes: 1 addition & 1 deletion source/stdcpp/test/map.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ import stdcpp.map;
unittest
{
auto mymap = Map!(int, char).make();
mymap.opIndexAssign(4, 'a');
map.opIndexAssign(1, 'a');
}

0 comments on commit 27b87ae

Please sign in to comment.