我有带有签名的函数:
void add_word_rule(const std::string& word);
void add_multiple_word_rules(const std::vector<std::string>& words);
Run Code Online (Sandbox Code Playgroud)
问题是这样的。如果用户调用该函数
add_word_rule({"word_1","word_2"});
Run Code Online (Sandbox Code Playgroud)
它将编译。如何确保这样的调用不会编译?我怎样才能禁用这个构造函数basic_string( InputIt first, InputIt last)?
c++ ×1