mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-20 12:58:06 +08:00
doc: add reference manual
This commit is contained in:
33
docs/content.ja/docs/reference/conversion.md
Normal file
33
docs/content.ja/docs/reference/conversion.md
Normal file
@@ -0,0 +1,33 @@
|
||||
+++
|
||||
title = "conversion.hpp"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# conversion.hpp
|
||||
|
||||
`toml::get`や`toml::find`でユーザー定義型をサポートするための変換関数を自動定義するマクロを提供します。
|
||||
|
||||
```cpp
|
||||
TOML11_DEFINE_CONVERSION_NON_INTRUSIVE(NAME, ...)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
```cpp
|
||||
namespace foo
|
||||
{
|
||||
struct Foo
|
||||
{
|
||||
std::string s;
|
||||
double d;
|
||||
int i;
|
||||
};
|
||||
} // foo
|
||||
|
||||
TOML11_DEFINE_CONVERSION_NON_INTRUSIVE(foo::Foo, s, d, i)
|
||||
```
|
||||
|
||||
# 関連項目
|
||||
|
||||
- [from.hpp]({{<ref "from.md">}})
|
||||
- [into.hpp]({{<ref "into.md">}})
|
Reference in New Issue
Block a user