From d90c26f9ac18f2d668c15f15eeae2769d903bbc6 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Fri, 16 Apr 2021 15:28:58 +0900 Subject: [PATCH] feat: add TOML11_PRESERVE_COMMENTS_BY_DEFAULT --- toml/comments.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toml/comments.hpp b/toml/comments.hpp index 92fc8e1..b9ce806 100644 --- a/toml/comments.hpp +++ b/toml/comments.hpp @@ -10,6 +10,12 @@ #include #include +#ifdef TOML11_PRESERVE_COMMENTS_BY_DEFAULT +# define TOML11_DEFAULT_COMMENT_STRATEGY ::toml::preserve_comments +#else +# define TOML11_DEFAULT_COMMENT_STRATEGY ::toml::discard_comments +#endif + // This file provides mainly two classes, `preserve_comments` and `discard_comments`. // Those two are a container that have the same interface as `std::vector` // but bahaves in the opposite way. `preserve_comments` is just the same as