std::declval 和 decltype
題圖來自於 C++ Type Deduction Introduction - hacking C++ 但略有變形以適合 banner
關於 decltype
decltype(expr) 是一個 C++11 新增的關鍵字,它的作用是將實體或者表達式的類型求出來。
#include iostream
int main() {
int i = 33
從 Ruby 的 method_missing 到雜魚 Common Lisp
在 Ruby 中當調用一個對象不存在的方法時,會觸發解釋器調用該對象的method_missing方法。例如下面的代碼
# -*- encoding: UTF-8 -*-
class A
def method_missing(m, *args, block)
puts 'now you see