Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何返回另一个函数?我得到的编译器错误(在 Visual Studio 上)是“函数返回函数”
template <> class encoder<uint16_t, endian_swap> { public: uint16_t opeartor () (uint16_t& value){ // do something } };
因为
uint16_t opeartor ()
看起来像一个被调用的函数的声明,opeartor它不带参数并返回uint16_t。尝试
opeartor
uint16_t
uint16_t operator ()