Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

EPE-972:Add support for std::tuple in eosio.cdt #1215

Open
wants to merge 3 commits into
base: release/1.8.x
Choose a base branch
from

Conversation

plroblox
Copy link

@plroblox plroblox commented Oct 7, 2021

Change Description

Merge into CDT release/1.8.x to solve an issue to compile contract in eos/unittests/test-contracts/kv_addr_book/ correctly
Here to make toolchain test successful, two commits are cherry picked, one is from my PR1193 , the other is from Qing's early change on map of map in abigen.hpp

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

break;
return name.substr(0,i+1);
};
kv.name = remove_ending_brackets(name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement can be rewritten as

kv.name.assign(name.begin(),
               std::find_if_not(name.rbegin(), 
                                name.rend(), 
                                [](char v) { return v == '[' || v==']'; }).base());

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your statement using string::assign and find_it_not looks more concise, but it was Qing's code and it works with no issue, so I prefer not to change it

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

Successfully merging this pull request may close these issues.

3 participants