Last active
November 5, 2018 03:50
-
-
Save swkpku/87a517d08ce9500de156d9c173696465 to your computer and use it in GitHub Desktop.
我就是程序员 第一季 第一期
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <map> | |
class R { | |
}; | |
class S { | |
R &m_r; | |
public: | |
S(R &r): m_r(r) { | |
} | |
}; | |
void InsertIfNotExists(std::map<int, S> &m, int i, R &r) { | |
if (m.find(i) == m.end()) | |
m[i] = S(r); | |
} | |
// Compiler: line 16: error C2280: 'S &S::operator=(const S &)': attempting to reference a deleted function | |
// Please fix this code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment