Skip to content

Instantly share code, notes, and snippets.

@keichi
Last active October 16, 2022 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keichi/49400c1115720dda22cb9ecaaec1cb5d to your computer and use it in GitHub Desktop.
Save keichi/49400c1115720dda22cb9ecaaec1cb5d to your computer and use it in GitHub Desktop.
ncc map::emplace issue
#include <map>
class A
{
public:
A(int a) {}
A(const A &a) = delete;
// A(A&& a) = default;
};
int main()
{
std::map<int, A> m;
m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
std::forward_as_tuple(2));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment