2012-02-09
■[C++] テンプレートテンプレートパラメータの特殊化
template template total specialization - Stack Overflow
使う機会はあまりないでしょうけど。
#include <vector> #include <list> template <template <class...> class Container> struct X { Container<int> c; }; template <> struct X<std::vector> { std::vector<std::string> c; }; int main() { X<std::list> ls; ls.c.push_back(3); X<std::vector> v; v.c.push_back("hello"); }
トラックバック - http://d.hatena.ne.jp/faith_and_brave/20120209/1328776529
リンク元
- 22 http://t.co/EOfeoGde
- 10 http://t.co/kQNdGO9h
- 9 http://www.google.com/reader/view/
- 8 http://www.google.co.jp/url?sa=t&rct=j&q=presentmodalviewcontroller&source=web&cd=3&sqi=2&ved=0CEEQFjAC&url=http://d.hatena.ne.jp/faith_and_brave/20110112/1294799495&ei=koczT7b9GIadmQXK6oiKAg&usg=AFQjCNEvikozqbzol84D_Hoi3ZnBfA35Uw&sig2=KSbLTZo
- 7 http://b.hatena.ne.jp/keyword/C++0x?sort=eid
- 7 http://t.co/bM0Gu3n9
- 7 http://www.google.co.jp/url?sa=t&rct=j&q=quickcheck++&source=web&cd=1&ved=0CC8QFjAA&url=http://d.hatena.ne.jp/faith_and_brave/20100310/1268206339&ei=8Hs0T_PNIe7DmQXz39iNAg&usg=AFQjCNG1TCY-Qo8h679e9JIm7J-YywVGTw&cad=rja
- 7 http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDIQFjAB&url=http://d.hatena.ne.jp/faith_and_brave/20081002/1222940314&ei=p7ozT-27OY2ImQX6-an5AQ&usg=AFQjCNETzPjwuE-aLwfPxcbs7vdzRlvwgw&sig2=SxmPLFlaRV4k3XIbiLve-w
- 5 http://www.google.co.jp/url?sa=t&rct=j&q=c++ 0x&source=web&cd=2&sqi=2&ved=0CDMQFjAB&url=http://d.hatena.ne.jp/faith_and_brave/20100201/1264997004&ei=-IgzT6f6H6WkmQW61siKAg&usg=AFQjCNH88RBKcb3sclAw9QXAhYQ7tCzg4A&sig2=y1pC5fXEecGUkSqdpCJHD
- 5 http://www.google.com/search