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