mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
doc: update std::visit arguments
This commit is contained in:
@@ -14,17 +14,9 @@ In `visit.hpp`, `toml::visit` is defined.
|
||||
```cpp
|
||||
namespace toml
|
||||
{
|
||||
template<typename Visitor, typename TC>
|
||||
template<typename Visitor, typename ... Args>
|
||||
/* Return value when Visitor is called with a value of basic_value<TC> */
|
||||
visit(Visitor&& visitor, const basic_value<TC>& v);
|
||||
|
||||
template<typename Visitor, typename TC>
|
||||
/* Return value when Visitor is called with a value of basic_value<TC> */
|
||||
visit(Visitor&& visitor, basic_value<TC>& v);
|
||||
|
||||
template<typename Visitor, typename TC>
|
||||
/* Return value when Visitor is called with a value of basic_value<TC> */
|
||||
visit(Visitor&& visitor, basic_value<TC>&& v);
|
||||
visit(Visitor&& visitor, Args&& ... args);
|
||||
}
|
||||
```
|
||||
|
||||
|
@@ -14,18 +14,12 @@ type = "docs"
|
||||
```cpp
|
||||
namespace toml
|
||||
{
|
||||
template<typename Visitor, typename TC>
|
||||
/* Visitor を basic_value<TC>の値で呼び出した際の返り値 */
|
||||
visit(Visitor&& visitor, const basic_value<TC>& v);
|
||||
|
||||
template<typename Visitor, typename TC>
|
||||
/* Visitor を basic_value<TC>の値で呼び出した際の返り値 */
|
||||
visit(Visitor&& visitor, basic_value<TC>& v)
|
||||
template<typename Visitor, typename ... Args>
|
||||
/* visitor にArgsの中身を渡した際の返り値 */
|
||||
visit(Visitor&& visitor, Args&& ... args);
|
||||
|
||||
template<typename Visitor, typename TC>
|
||||
/* Visitor を basic_value<TC>の値で呼び出した際の返り値 */
|
||||
visit(Visitor&& visitor, basic_value<TC>&& v)
|
||||
}
|
||||
} // toml
|
||||
```
|
||||
|
||||
`basic_value<TC>`が保持している型に対応する`Visitor`のオーバーロードを呼び出し、その結果を返します。
|
||||
|
Reference in New Issue
Block a user