ToruNiina
db1f42b5da
fix: enable to control macro definition
2021-04-02 17:21:25 +09:00
ToruNiina
14c6430dda
Merge branch 'master' into auto-conversion-macro
2021-04-02 16:25:41 +09:00
ToruNiina
a3b8dd6787
fix( #152 ): add newline btw kv-pair and subtables
2021-03-31 10:52:18 +09:00
ToruNiina
c121492071
fix: uneven spacing between tables
...
related: issue #152
2021-03-29 17:48:03 +09:00
ToruNiina
b924e70e3c
feat: add a simple way to disable <filesystem>
...
As jwillikers pointed out in #150 , there is a case where compiler
defines the corresponding feature test macro of <filesystem> but is
actually not available. The macro is a way to disable the feature
regardless of the status of feature test macro.
2021-03-25 11:44:11 +09:00
sneakypete81
08859c36d0
Fix typo in error message
2021-01-30 20:04:00 +00:00
Alex Merry
db2d33ca4b
Add missing header for std::out_of_range exception
...
Failure seen on GCC 4.8.5 when including "toml/value.hpp".
2020-12-09 10:39:10 +00:00
Alex Merry
935da51769
Add missing include for ostringstream
...
Since region.hpp no longer includes <iostream> (but only <iomanip>),
source_location.hpp no longer includes a header that provides
std::ostringstream. Including <sstream> fixes this.
2020-12-09 10:19:07 +00:00
ToruNiina
9b472a6c72
fix: check it is empty before calling back
2020-11-04 23:24:59 +09:00
ToruNiina
1ead14589e
fix: check if it is empty before calling back()
2020-11-04 23:24:02 +09:00
ToruNiina
a6581ee66b
fix: an empty array is not an array of table
2020-11-03 20:34:01 +09:00
ToruNiina
908b91079b
fix: distinguish the comments and try to keep it
...
If a value has a comment, we need to try to write it explicitly.
2020-10-18 20:43:33 +09:00
ToruNiina
fce6ff317e
refactor: distinguish the reason of failure
2020-10-18 18:36:05 +09:00
ToruNiina
fd50b11523
refactor: add write_comments()
2020-10-18 18:35:56 +09:00
ToruNiina
9090b8273c
refactor: move array-of-table stuff to a function
2020-10-18 17:20:06 +09:00
ToruNiina
88882b523f
feat: add a macro defines convertion automatically
2020-10-16 21:40:47 +09:00
ToruNiina
382e3dc3ab
refactor: use serializer::is_array_of_tables
2020-10-14 22:27:29 +09:00
ToruNiina
f7bfcdd7aa
fix: check all the elements in an array
...
while checking if the array is array-of-tables or not (heterogeneous
arrays are allowed, so there might be an array that has a table and
an integer at the same time)
2020-10-14 18:00:04 +09:00
ToruNiina
2e41a26785
Merge branch 'master' of github.com:ToruNiina/toml11 into master
2020-10-14 15:35:18 +09:00
ToruNiina
f283a257d2
Revert "quick temporary patch for comment dup"
...
This reverts commit a6d38c1ec0
.
Since the problem is solved, we don't need this patch any more.
2020-10-13 22:02:32 +09:00
ToruNiina
3d86f3a4e1
fix: avoid comment duplication in array of tables
2020-10-13 21:59:46 +09:00
ToruNiina
dc5a8069a9
refactor: require comments while construction
...
Note: at this commit, the code would not compile.
2020-10-13 21:58:08 +09:00
Ivan Shynkarenka
5d8c573357
Fixed: Compile toml11 with MinGW cause error in <filesystem> #136
2020-10-03 23:16:58 +03:00
Ivan Shynkarenka
6e1e5ccd84
Fixed: Compile toml11 with MinGW cause error in <filesystem> #136
2020-10-03 23:06:47 +03:00
Ivan Shynkarenka
f2d9fd1d1f
Fixed: Compile toml11 with MinGW cause error in <filesystem> #136
2020-10-03 22:36:59 +03:00
Ivan Shynkarenka
97c8cbdaf5
Fixed: Compile toml11 with MinGW cause error in <filesystem> #135
2020-10-02 19:10:04 +03:00
ToruNiina
05ceb5ae79
fix: workaround for error around SFINAE in MSVC
...
avoid lambda with template argument
2020-09-29 02:26:16 +09:00
ToruNiina
0fec125688
feat: remove default value from internal src
2020-09-29 01:40:49 +09:00
ToruNiina
a6d38c1ec0
fix: add a quick temporary patch for comment dup
...
first aid for #131
2020-09-22 17:36:24 +09:00
ToruNiina
670186fac7
Merge branch 'master' into allow-comment-before-comma
2020-09-19 18:10:45 +09:00
ToruNiina
a32cd6cb61
feat: enable to use u8""_toml literal in C++20
2020-09-16 21:24:03 +09:00
ToruNiina
003bc16c1b
fix: skip the last zero in the file
2020-09-14 16:35:51 +09:00
ToruNiina
5f38127692
feat: allow comments before comma
...
replace ws by ws_comment_newline, as suggested.
discussed here: toml-lang/toml/issues/766
2020-08-16 11:03:58 +09:00
ToruNiina
3c3ebd88b4
feat: improve error message about invalid keys
2020-08-09 18:38:50 +09:00
ToruNiina
08f7ea9c56
refactor: remove extraneous whitespaces in errmsg
2020-08-09 18:38:21 +09:00
ToruNiina
cde29399f4
fix: use 1 in source_location as the default pos
2020-08-07 22:24:01 +09:00
ToruNiina
4fa94d45b3
fix: use const char* instead of &char[N]
...
to enable to pass char*, not only string literal
2020-08-04 20:08:58 +09:00
ToruNiina
4e6ae9a994
refactor: avoid string construct in format_ul
2020-07-30 16:11:35 +09:00
ToruNiina
f23c003d2f
fix: add missing namespace specifier
2020-07-28 00:04:25 +09:00
ToruNiina
4b719f0806
refactor: use location() instead of get_region
2020-07-27 23:15:14 +09:00
ToruNiina
22ace027de
refactor: rm template from detail::change_region
2020-07-27 23:04:24 +09:00
ToruNiina
bc219af5b5
refactor: use location() member instead of ctor
2020-07-27 23:03:33 +09:00
ToruNiina
68e8a31659
refactor: remove needless addressof() call
2020-07-27 23:00:40 +09:00
ToruNiina
32a5341d09
refactor: use source_location, not region_base*
2020-07-27 22:29:18 +09:00
ToruNiina
ce68f6f4c2
refactor: check (always-valid) ptr before deref
2020-07-27 21:32:35 +09:00
ToruNiina
e696aabd11
refactor: change internal interface to reduce code
...
to remove `std::addressof` calls, get_region(toml::value) now
returns a pointer to region.
2020-07-27 00:48:04 +09:00
ToruNiina
7fb93e2f54
fix: add missing explicit
to detail::region
2020-07-27 00:20:26 +09:00
ToruNiina
19cc9a2edf
refactor: remove template from detail::region
2020-07-25 22:01:34 +09:00
ToruNiina
72f5afb6af
refactor: remove template from detail::location
2020-07-25 21:06:26 +09:00
ToruNiina
a8fa14d159
refactor: remove vec() method, use a constructor
2020-07-21 20:55:18 +09:00