C++相談室 part17
■ このスレッドは過去ログ倉庫に格納されています
0456デフォルトの名無しさん
NGNGなぜなんでしょうか?
#include<iostream>
using namespace std;
void test(char*)
{
cout << "char*" << std::endl;
}
void test(bool)
{
cout << "bool" << std::endl;
}
int main()
{
test(static_cast<char*>("a")); //char*
test(static_cast<volatile char*>("a")); //bool
test(static_cast<const volatile char*>("a")); //bool
}
■ このスレッドは過去ログ倉庫に格納されています