#include "attribute.h" namespace paddle_mobile { namespace framework { /* * Variant, std::vector, std::vector, bool, std::vector, BlockDesc *, int64_t> * */ struct PrintVistor: Vistor{ PrintVistor(Print &printer):printer_(printer){ } template Print &operator()(const T &value){ printer_ << value; return printer_; } private: Print &printer_; }; Print &operator<<(Print &printer, const Attribute &attr) { Attribute::ApplyVistor(PrintVistor(printer), attr); // std::vector v = {"1", "2"}; // printer << (v); return printer; } } } // namespace paddle_mobile