トピックの主題は次のとおりです。
#include <string>
#include <iostream>
void test(bool val)
{
std::cout << "bool" << std::endl;
}
void test(std::string val)
{
std::cout << "std::string" << std::endl;
}
int main(int argc, char *argv[])
{
test("hello");
return 0;
}
プログラムの出力はbool
. bool
バリアントが選択された理由