支离破碎的小脑洞。

未歌(mika)
年龄:17岁(不是16
魔法等级:???
魔法类型:???
变身状态:无

魔法少女。
但现在完全无法使用魔法(自称)。不是因为不能使用,而是不知道怎么使用(自称)。唯一一次使用魔法的时间是刚成为魔法少女的那个下午(自称)。

继续阅读“支离破碎的小脑洞。”

友元黑魔法——在类内定义友元函数

起因是我写了这么一段代码:

template <typename type>
class LIFO_stack : public my_stack<type> {
	template <typename ano_type>
	friend ostream& operator<<(ostream& os, LIFO_stack<ano_type>& s);
}
template <typename type>
ostream& operator<<(ostream& os, LIFO_stack<type>& s) {
	auto it = --s.vec.end();
	for (; it != s.vec.begin(); --it) {
		os << *it << ' ';
	}
	os << *it << endl;
	return os;
}

继续阅读“友元黑魔法——在类内定义友元函数”