Files
toml11/docs/content.en/docs/reference/conversion.md
2024-06-15 19:27:42 +09:00

520 B

+++ title = "conversion.hpp" type = "docs" +++

conversion.hpp

Provides macros to automatically define conversion functions for supporting user-defined types with toml::get and toml::find.

TOML11_DEFINE_CONVERSION_NON_INTRUSIVE(NAME, ...)

Example

namespace foo
{
struct Foo
{
    std::string s;
    double      d;
    int         i;
};
} // foo

TOML11_DEFINE_CONVERSION_NON_INTRUSIVE(foo::Foo, s, d, i)

Related

  • [from.hpp]({{<ref "from.md">}})
  • [into.hpp]({{<ref "into.md">}})