Skip to content

Commit

Permalink
simple map.d module
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Nyarko authored and Emmanuel Nyarko committed May 17, 2024
1 parent 7c83d65 commit 6fb71c4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions source/stdcpp/map.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* D bindings for std::map
* see_Also:
* https://en.cppreference.com/w/cpp/container/map
* Copyright: Copyright (c) 2023 D Language Foundation
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1.0.txt, Boost Software License 1.0).
* (See accompanying file License)
* Authors: Emmanuel Nyarko, Mathias Lang
*/
module stdcpp.map;

extern(C++, class):
struct Map(Key, Value)
{
extern(D) void opIndexAssign (const Key key, Value value)
{
this.insertOrAssign(key, value);
}

static Map* make();
private void insertOrAssign(const ref Key, const ref Value);
}

0 comments on commit 6fb71c4

Please sign in to comment.