文件名称:hana:您的元编程标准库
文件大小:1.48MB
文件格式:ZIP
更新时间:2024-02-20 08:37:53
cpp boost cpp14 metaprogramming cpp11
助推汉娜 您的元编程标准库 总览 # include < boost> # include < cassert> # include < string> namespace hana = boost::hana; using namespace hana ::literals ; struct Fish { std::string name; }; struct Cat { std::string name; }; struct Dog { std::string name; }; int main () { // Sequences capable of holding heterogeneous objects, and algorithms // to manipulate them. auto animals = hana::make_tuple (Fish{ " Nemo " }, Cat{ " Garfield " }, Dog{ " Snoopy " }); auto names = hana::transform (anim