這是我在看boost MPL時試著翻譯的東西,現(xiàn)在貼上來。
A metafunction is a class or a class template that represents a function invocable at compile-time.
一個原操作是在編譯器表現(xiàn)了調用操作的一個類或一個模板類。
An non-nullary metafunction is invoked by instantiating the class template with particular template parameters (metafunction arguments);
一個非無參的原操作被一個有詳細模板參數(shù)的模板類請求;
the result of the metafunction application is accessible through the instantiation's nested type typedef.
原操作應用的返回值是一個通過模板類實例可取的內(nèi)嵌的類型定義。
All metafunction's arguments must be types (i.e. only type template parameters are allowed).
所有的原操作的參數(shù)必須是類型。
A metafunction can have a variable number of parameters.
一個原操作能有一個數(shù)量變化的參數(shù)
A nullary metafunction is represented as a (template) class with a nested type typename member.
一個無參數(shù)原操作被表現(xiàn)為有內(nèi)嵌重命名類型的類
原操作的三種表達式(f是一個原操作)
1 f::type
2 f<>::type
3 f< a1,..,an >::type
Lambda Expression 構造和分配表達式
A Lambda Expression is a compile-time invocable entity in either of the following two forms:
一個構造和分配表達式是下面兩個中的一個編譯期調用單元
Metafunction Class
原操作類
Placeholder Expression
站位符表達式
Most of the MPL components accept either of those, and the concept gives us a consice way to describe these requirements.
大部分的MPL組件接收它們其中一個,
posted on 2007-04-07 16:20
walkspeed 閱讀(518)
評論(0) 編輯 收藏 引用 所屬分類:
STL、Boost、范型編程 、
C++語言