C++ 如何记录接受回调的函数?

C++ 如何记录接受回调的函数?,c++,doxygen,C++,Doxygen,我正在编写一个异步库,我的一些方法将回调作为参数: /// \brief Opens a connection to the remote server defined by the parameters passed in the constructor. /// \param[in] callback Callback passed when the connection is estabelished or fails. /// \return Any errors encountered

我正在编写一个异步库,我的一些方法将回调作为参数:

/// \brief Opens a connection to the remote server defined by the parameters passed in the constructor.
/// \param[in] callback Callback passed when the connection is estabelished or fails.
/// \return Any errors encountered by the library or the OS.
virtual connect(std::function<void(std::error_code ec)> callback) noexcept = 0;
//\brief打开到由构造函数中传递的参数定义的远程服务器的连接。
///\param[in]在建立连接或连接失败时传递的回调。
///\返回库或操作系统遇到的任何错误。
虚拟连接(std::函数回调)noexcept=0;

如何在Doxygen中记录回调的参数?

您希望以嵌套方式(函数参数中的函数)记录functor本身,但Doxygen不支持这种方式。您可以使用和一些手动操作。另一种手动方式是将回调定义移动到
typedef
并在其中记录,这同样需要手动操作,因为Doxygen不支持以这种方式记录functor本身。

您希望以嵌套方式记录functor本身(函数参数中的函数),但强氧剂并不支持这一点。您可以使用和一些手动操作。另一种手动方式是将回调定义移动到
typedef
并用文档记录在那里,这同样需要手动操作,因为Doxygen不以这种方式支持函子。

Doxygen不接受吗?我不明白。我也不明白你的问题。doxygen的输出是什么?doxygen不接受吗?我不明白。我也不明白你的问题。doxygen的输出是什么?