Re: [闲聊] BBS 程式码上色器测试

楼主: nh60211as   2021-03-17 14:20:05
※ 引述《nh60211as (xXx_5354M3_31M0_xXx)》之铭言:
: #1WIVDhmM (C_and_CPP)
: BBS 程式码上色器
: 这篇文章的测试,只有支援C++、Qt、跟std lib,
: 满好玩的,可是没有处理PTT每行的字数限制
现在又支援 Python 了,也会有每行字数限制警告
#include <iostream>
template<typename T>
bool test( T v1) { return !v1; }
namespace A
{
struct X { };
}
bool operator!(A::X)
{
return true;
}
int main()
{
using namespace std;
cout << boolalpha << test( A::X{} ) << endl;
}

Links booklink

Contact Us: admin [ a t ] ucptt.com