mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-01-10 09:20:11 +00:00
feat: enable to convert preserve/discard comments
This commit is contained in:
parent
f9b5166c09
commit
898423166f
@ -18,6 +18,7 @@
|
||||
// error whenever you access to the element.
|
||||
namespace toml
|
||||
{
|
||||
struct discard_comments; // forward decl
|
||||
|
||||
// use it in the following way
|
||||
//
|
||||
@ -54,6 +55,7 @@ struct preserve_comments
|
||||
explicit preserve_comments(std::vector<std::string>&& c)
|
||||
: comments(std::move(c))
|
||||
{}
|
||||
explicit preserve_comments(const discard_comments&) {}
|
||||
|
||||
explicit preserve_comments(size_type n): comments(n) {}
|
||||
preserve_comments(size_type n, const std::string& x): comments(n, x) {}
|
||||
@ -276,6 +278,7 @@ struct discard_comments
|
||||
|
||||
explicit discard_comments(const std::vector<std::string>&) noexcept {}
|
||||
explicit discard_comments(std::vector<std::string>&&) noexcept {}
|
||||
explicit discard_comments(const preserve_comments&) noexcept {}
|
||||
|
||||
explicit discard_comments(size_type) noexcept {}
|
||||
discard_comments(size_type, const std::string&) noexcept {}
|
||||
|
Loading…
Reference in New Issue
Block a user