我看到这段代码,它是一个类成员函数定义。但是参数只是 std::tuple<> 并且没有在函数体中使用。这是什么意思? (来自 dlib.net dlib/dnn/core.h)
add_layer (
std::tuple<>
) : add_layer() {}
最佳答案
the argument is just std::tuple<> and it is not being used in the function body.
没有什么
std::tuple<>
可用于函数体中。这是一个空类。What does this mean?
它是一个构造函数。它委托(delegate)给默认构造函数。
关于函数体中没有使用c++成员函数参数,这是什么情况?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64218789/