Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Pusher and Reader for unordered_map with Hash param #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feltech
Copy link

@feltech feltech commented Jul 24, 2016

  • If a Hash template parameter is used when constructing a
    std::unordered_map (which is required for boost::variant keys), then
    the Pusher and Reader template parameter deduction fails, and we
    revert to assuming a simple userdata pointer.
  • This means we cannot read and write a std::unordered_map that has boost::variant keys as a Lua
    table.
  • So simply add the missing Hasher template param to the Pusher and Reader
    for std::unordered_map.

* If a `Hash` template parameter is used when constructing a
`std::unordered_map` (which is required for `boost::variant` keys), then
the `Pusher` and `Reader` template parameter deduction fails, and we
revert to assuming a simple `userdata` pointer.
* This means we cannot read and write std::unordered_map`s as lua
tables.
* So simply add a `Hasher` template param to the `Pusher` and `Reader`
for `std::unordered_map`.
@Habbie
Copy link
Collaborator

Habbie commented Mar 16, 2017

Want to write a test for this? If you rebase onto master, the testing framework is no longer broken, and Travis will test your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants