ToruNiina
75999aa9ad
refactor: add a constructor to location
...
By adding the constructor, vec() would not be not needed. But inserting
Container = std::string makes the constructor ambiguous, so it breaks
the current code.
2020-07-21 20:53:44 +09:00
ToruNiina
259da54edb
refactor: always use vector<char> in location
...
`location` and `region` have a (shared_ptr to the) container of TOML
contents. Those take a template argument to allow both std::vector<char>
and std::string as an interanal container. But since those are internal
feature, i.e. it should not be used by a user directly, this template
can be removed by re-writing a parser a bit. This introduces a
complexity to toml11 error reporting system, so I'm removing this.
First, remove all the location<std::string> from the parser. Then the
template argument can be removed because everyone uses std::vector<char>
now.
2020-07-20 19:52:11 +09:00
ToruNiina
b461f363da
refactor: add a method to reduce complexity later
2020-07-20 19:40:55 +09:00
ToruNiina
4e0624aa60
feat: make sure the last null is removed
2020-07-19 16:56:31 +09:00
ToruNiina
3ac2c065eb
Merge branch 'reorder-headers' to master
2020-07-17 15:17:40 +09:00
ToruNiina
470f81dc94
fix : #123 merge branch 'windows-nominmax'
2020-07-10 20:55:53 +09:00
ToruNiina
761e576991
fix: workaround for windows.h that defines min/max
...
related to #123
2020-07-10 15:07:13 +09:00
ToruNiina
e6e84714c5
Merge branch 'master' into reorder-headers
2020-07-10 00:06:22 +09:00
Marius Maaß
92aa42a58e
Fix MSVC warning C4866
...
This fixes the warning "compiler may not enforce left-to-right
evaluation order for call to" that is caused by Visual Studio if this is
compiled with a target of C++17.
2020-07-03 08:00:47 +02:00
ToruNiina
b1c9df8998
feat: reorder headers following google c++ style
...
related to: #115
2020-06-28 00:58:20 +09:00
ToruNiina
57c6652360
Merge branch 'master' into std-filesystem
2020-06-06 17:25:26 +09:00
ToruNiina
defde33544
fix: avoid ambiguity in overload resolution
...
Since both `std::string` and `std::filesystem::path` can be convertible
from `const char &[N]` (like, `parse("file.toml")`), after adding
`parse(std::filesystem::path)`, the overload resolution of
`parse("file.toml")` becomes ambiguous. By adding `parse(...)` that
exactly matches to `parse("file.toml")`, we can remove this ambiguity.
2020-06-06 17:18:02 +09:00
ToruNiina
46ed051740
fix: pass path.string as a filename
2020-06-05 23:15:19 +09:00
ToruNiina
2963d9a25b
feat: add std::filesystem::path support
2020-06-05 19:43:23 +09:00
Scott McCaskill
57d4e196a3
when parsing a local_time, parse up to 9 digits worth (nanoseconds) of fractional seconds
2020-05-10 16:06:52 -05:00
ToruNiina
125f608fa5
feat: remove TOML11_UNRELEASED_FEATURES.
...
v1.0.0-rc.1 has been released
2020-04-03 23:42:58 +09:00
ToruNiina
79594709fe
fix: don't use default ctor when converting to map
2020-03-30 15:02:26 +09:00
ToruNiina
95c3b5f538
feat: use push_back instead of resize
2020-03-27 18:06:26 +09:00
ToruNiina
9b52dc0131
feat: remove resize and add try_reserve
2020-03-27 18:05:31 +09:00
ToruNiina
5212992f05
feat: add is_std_forward_list
...
std::forward_list does not have push_back, insert, or emplace but
push_front, insert_after, and emplace_after. We need to distinguish it
from other continers.
2020-03-27 18:02:37 +09:00
ToruNiina
fcd6e47500
feat: add meta funcs, has_reserve/push_back_method
2020-03-27 18:01:47 +09:00
ToruNiina
31826b55ce
feat: avoid double checking in helper methods
2020-03-25 22:49:19 +09:00
ToruNiina
d7662347f2
refactor: shorten switch_cast definition by macro
2020-03-21 17:44:23 +09:00
ToruNiina
5f5539d402
feat: throw informative error from value.at(...)
2020-03-21 17:09:04 +09:00
ToruNiina
c2151cab0b
refactor: show func name in bad_cast from helpers
2020-03-21 17:06:34 +09:00
ToruNiina
653c87592c
feat: enable to show function name in bad_cast
2020-03-21 17:04:05 +09:00
ToruNiina
bdf4e75122
refactor: move helper function from get to value
2020-03-21 16:57:12 +09:00
ToruNiina
af8cf9ddc5
refactor: remove redundant functions in serializer
2020-03-13 13:55:14 +09:00
ToruNiina
f125cca010
refactor: simplify serializer's template argument
2020-03-12 13:46:17 +09:00
ToruNiina
d11e42ca7e
fix: explicitly say the table is top-level
...
The top-level table has its region at the first character of the file.
That means that, in the case when a key is not found in the top-level
table, the error message points to the first character. If the file has
its first table at the first line, the error message would be like this.
```console
[error] key "a" not found
--> example.toml
|
1 | [table]
| ^------ in this table
```
It actually points to the top-level table at the first character,
not `[table]`. But it is too confusing. To avoid the confusion, the
error message should explicitly say "key not found in the top-level
table".
2020-02-29 22:56:29 +09:00
ToruNiina
128b66bda9
refactor: add missing whitespace
2020-02-29 22:54:50 +09:00
ToruNiina
d1af42f151
refactor: add throw_key_not_found_error
...
and replace related throw statements with it
2020-02-29 22:23:15 +09:00
ToruNiina
5e3ffb70dd
fix: check clang macro when checking gcc is used
2020-02-19 17:00:22 +09:00
ToruNiina
82fec38e37
refactor: simplify internally-used function
2020-02-19 15:46:25 +09:00
ToruNiina
189b910384
fix: solve #97 in the naivest way, macros
2020-02-19 15:44:38 +09:00
Jordan Williams
6b5944e839
fix -Wundef warnings
2020-02-11 06:30:18 -06:00
Jordan Williams
3b6417de00
fix clang range-loop-analysis warnings
2020-02-11 06:13:55 -06:00
ToruNiina
f6a41d986c
feat: handle quotes in strings in the better way
...
- if a basic string contains any double quote, make it multiline.
- because 1 or 2 consecutive "s do not require escape sequence in it.
- if a basic string will be sufficiently long, make it multiline.
- if 3 consecutive "s appeared, insert backslash to break it down.
2020-02-05 22:42:10 +09:00
ToruNiina
16fc172b21
feat: check string length before adding newline
...
In literal strings, only the first newline will be trimmed.
```toml
str = '''
The first newline will be trimmed.'''
```
The previous code always adds this first-newline, but after this commit
it checks the length of the string and adds newline if the string is
sufficiently long.
2020-02-05 22:39:08 +09:00
ToruNiina
0582e1535b
fix: handle edge-cases with quotes in ml-string
...
See comments in the code for detail.
2020-02-04 22:36:39 +09:00
ToruNiina
5ca3a3c262
refactor: change ifdef UNRELEASED_FEATURE region
...
to eliminate dead code after returning from a function
2020-02-04 21:05:03 +09:00
ToruNiina
49fdb61731
refactor: add explicit to ctors of internal types
2020-01-24 15:58:24 +09:00
ToruNiina
0c58549fc6
Merge branch 'master' of github.com:ToruNiina/toml11
2020-01-22 12:20:34 +09:00
ToruNiina
22d630fec1
feat: replace detail::stuff by std if possible
2020-01-20 12:18:05 +09:00
ToruNiina
f7bf341452
fix: add missing noexcept specifier
2020-01-19 21:06:10 +09:00
ToruNiina
0934d90f90
refactor: move ctors that are only used internally
2020-01-19 18:30:27 +09:00
ToruNiina
f2c8d0e279
refactor: add missing explicit to toml::exception
2020-01-19 17:51:24 +09:00
ToruNiina
8b737dc21f
feat: add member methods to toml::value
2020-01-16 20:58:10 +09:00
ToruNiina
9bef715ccd
fix: use u32 as a result of binary operation
2020-01-13 11:26:53 +09:00
ToruNiina
d2b1cf5123
refactor: just use a constructor
...
to remove conversions
2020-01-13 11:26:29 +09:00
ToruNiina
9f92916d1d
fix: suppress -Wuseless-conversion
...
`{integer} + 1` will automatically be an int, so static_cast<int>(a+1)
will be useless conversion.
2020-01-13 11:24:48 +09:00
ToruNiina
666e4cf9dc
fix: suppress sign-conversion warnings
2020-01-13 00:46:21 +09:00
ToruNiina
490abe04fd
refactor: remove redundant template argument
2020-01-12 23:07:17 +09:00
ToruNiina
81ed4c0e9d
Merge branch 'master' of github.com:ToruNiina/toml11
2020-01-10 21:17:17 +09:00
ToruNiina
55260654bf
feat: get user-defined value by constructor
...
If a user-defined constructor has constructor(const toml::value&),
then it should be convertible in `toml::get` and `toml::find`.
2020-01-10 20:38:52 +09:00
ToruNiina
c54a03f189
Merge branch 'master' into find-idx
2020-01-09 00:27:51 +09:00
ToruNiina
7f020f3f44
refactor: remove error prefix
...
that will automatically be added in format_underline
2020-01-07 22:27:13 +09:00
ToruNiina
827b433389
Merge branch 'master' into find-idx
2020-01-07 22:13:15 +09:00
ToruNiina
18f84088b4
perf: avoid tmp str construction while checking
2019-12-19 22:13:47 +09:00
ToruNiina
c199bd8b49
feat: enable to access the 1st char of region
2019-12-19 22:13:33 +09:00
ToruNiina
5b35c1a74e
fix: prohibit modification on inline table
...
According to toml-lang/toml:36d3091b3 "Clarify that inline tables are
immutable", check if it adds key-value pair to an inline table.
This is one of the unreleased (after-0.5.0) toml feature. But this is
marked as "Clarify", so TOML-lang intended that inline tables are
immutable in all version.
2019-12-19 22:02:17 +09:00
ToruNiina
d3513c0f84
fix: fmt line num in err msg correctly
2019-12-17 19:35:26 +09:00
ToruNiina
4688c235f5
refactor: rename internal macro value
2019-12-12 17:38:29 +09:00
ToruNiina
5c146857a3
Merge branch 'master' into colorize-err-msg
2019-12-11 22:49:38 +09:00
ToruNiina
bc51699415
Merge branch 'bracket-operator'
2019-12-11 19:36:21 +09:00
OGAWA KenIchi
3190c1da9f
fix: suppress warning on Intel C++ Compiler
2019-12-11 17:47:16 +09:00
ToruNiina
8fbeaabfd9
feat: add operator[] to access table/array
2019-12-10 00:00:05 +09:00
ToruNiina
331de4ea5d
fix: use datetime info while getting time offset
...
to convert offset_datetime to system_clock::time_point.
2019-12-08 22:44:12 +11:00
ToruNiina
b246f5ac5c
fix: combine date and time to convert loc datetime
...
Normally DST begins at A.M. 3 or 4. If we re-use conversion operator
of local_date and local_time independently, the conversion fails if
it is the day when DST begins or ends. Since local_date considers the
time is 00:00 A.M. and local_time does not consider DST because it
does not have any date information. We need to consider both date and
time information at the same time to convert it correctly.
2019-12-08 22:38:49 +11:00
ToruNiina
62c01f9826
fix: consider timezone correctly
...
explicitly set tm.tm_isdst = 0 and use UTC offset
2019-12-06 20:57:51 +09:00
ToruNiina
5a8d368927
feat: add thread-safe detail::gmtime_s
2019-12-06 20:33:15 +09:00
blockparty
6d41a1adb9
Suppress unused variable warning
2019-11-22 05:59:55 -06:00
blockparty
7e62dad6dc
Check if features are defined
2019-11-21 05:51:31 -06:00
ToruNiina
2fd466a3c3
fix: skip only the prefix, keep spaces
2019-11-14 15:32:17 +09:00
ToruNiina
6f7539dc6a
fix: deduplicate [error] prefix in the messages
2019-11-14 15:31:27 +09:00
ToruNiina
f290390c63
fix: consider the no-space cases like [error]:
2019-11-13 18:14:42 +09:00
ToruNiina
571baa2c26
refactor: remove nocolor:: operations
...
since color can be on-off at runtime
2019-11-13 18:08:31 +09:00
ToruNiina
bbe33e87d9
feat: detect [error] prefix duplication
2019-11-13 18:05:37 +09:00
ToruNiina
4c5076f263
feat: add runtime colorize flag
2019-11-13 18:01:47 +09:00
ToruNiina
d47174954f
feat: colorize user-defined msg by format_error
2019-11-13 18:00:55 +09:00
ToruNiina
821eb9632b
feat: add a macro-dependent constant
2019-11-13 17:59:47 +09:00
ToruNiina
af116991b6
fix: remove overlapping [error] sign
2019-11-13 17:35:23 +09:00
ToruNiina
87bebbc37d
feat: put color to the internal error messages
2019-11-13 17:35:05 +09:00
ToruNiina
c2d0351e69
feat: add (ANSI) terminal colorize operators
2019-11-13 17:24:51 +09:00
ToruNiina
1526b9feee
Merge branch 'heterogeneous-array'
2019-11-09 11:03:18 +09:00
ToruNiina
adf8fa9234
fix: fix typos in an error message in toml::get
...
when converting toml::value to std::tuple
2019-11-08 16:12:18 +09:00
ToruNiina
9af2d65417
feat: allow heterogenous array
...
if TOML11_USE_UNRELEASED_TOML_FEATURES is activated.
In TOML v0.5.0, heterogenous arrays are not allowed. But after some
discussions in toml-lang/toml, it is decided to allow it in the next
release (toml-lang/toml/pull/676).
To support it, disable type check in parse_array function.
2019-11-08 15:36:58 +09:00
ToruNiina
8240fffeca
Merge branch 'master' into add-src-loc-to-exception
2019-11-02 12:53:16 +09:00
ToruNiina
047611764c
fix: silly typo
2019-11-01 21:15:20 +09:00
ToruNiina
bc3eb9d967
feat: add src_loc to all the exceptions
...
including internal_error.
2019-11-01 21:14:33 +09:00
ToruNiina
6862264bde
feat: use the first char as the top-level region
...
A bit related to #89
2019-11-01 20:47:25 +09:00
ToruNiina
2ee69fc420
fix: improve error messages about strings a bit
2019-11-01 13:34:15 +09:00
ToruNiina
6a15e8360f
refactor: remove redundant namespace specifier
2019-10-31 23:13:49 +09:00
ToruNiina
41eb1d6887
feat: pass source_location to exception
2019-10-31 22:23:31 +09:00
ToruNiina
3ca712a8da
feat: check line_num before converting it to int
2019-10-31 22:21:24 +09:00
ToruNiina
8e589ff4d7
feat: add source_location to (syntax_|type_)error
2019-10-31 22:04:16 +09:00
ToruNiina
56812114c3
refactor: simplify inclusion dependencies
2019-10-31 21:58:28 +09:00
ToruNiina
f98615d0df
fix: check file content is empty or not
2019-10-30 16:49:49 +09:00
ToruNiina
37769e28f0
fix #88 : check if input is null-terminated or not
2019-10-30 16:33:22 +09:00
ToruNiina
258e62f8f3
feat: add operator+= to toml::string
2019-10-09 21:51:14 +09:00
ToruNiina
b4b35ea33e
feat: allow 0-prefix exponent if the flag is on
...
If unreleased feature is activated, zero-prefixes in an exponent part of
a floating point is allowed. If the flag TOML11_UNRELEASED_TOML_FEATURES
is turned on, we don't need to check whether there is a zero prefix in
the exponent part that is formatted by a standard library.
2019-10-08 23:23:53 +09:00
ToruNiina
d7b4d104d3
refactor: reduce checking; just check once
2019-10-08 23:15:03 +09:00
ToruNiina
1148d01c70
Merge branch 'master' into find-idx
2019-10-07 11:11:08 +09:00
ToruNiina
488015df49
fix: toml -> T is required; related to #83
2019-10-04 13:00:34 +09:00
ToruNiina
4c12dad51f
feat: add find<T>(value, idx) for arrays ( #79 )
2019-10-03 15:27:25 +09:00
ToruNiina
ad7eb56634
fix: avoid potential memory bugs related to move
2019-10-03 14:42:52 +09:00
ToruNiina
22dac3c9f2
Merge branch 'value-at'
2019-09-28 19:40:51 +09:00
ToruNiina
d5adfe8c7d
refactor: use as_xxx instead of cast<enum>
...
because cast<enum>() requires `template` specifier inside a template
function. it makes code long.
2019-09-28 17:01:45 +09:00
ToruNiina
d73bc6076c
feat: add basic_value::at(key) and at(idx)
2019-09-28 16:21:51 +09:00
ToruNiina
f3d3f63ff9
fix: return values from find_or(value&&)
2019-09-28 13:38:26 +09:00
ToruNiina
b44fbad925
fix: remove needless ::type
2019-09-28 11:14:14 +09:00
ToruNiina
826c9444ac
refactor: use remove_cvref
2019-09-28 11:03:46 +09:00
ToruNiina
a1095f3e4c
refactor: use std::map::at instead of []
2019-09-28 11:03:14 +09:00
ToruNiina
483a39beb4
refactor: remove unsupported overload
...
expect<T>(table, ...)
2019-09-28 11:00:35 +09:00
ToruNiina
1409114c96
refactor: add utility meta-func for internal use
2019-09-28 10:58:02 +09:00
ToruNiina
ecfc9d0c5a
fix: make return type rvalue when rvalue is passed
2019-09-28 10:31:10 +09:00
ToruNiina
c2e1aa9a3c
Merge branch 'master' into fp-exp-leading-zeroes
2019-09-05 13:50:58 +09:00
ToruNiina
5b5ece6c32
fix: add "unreleased" flag to raw-tab-in-string
2019-09-04 18:10:15 +09:00
ToruNiina
4f8b62a7e9
feat: add TOML11_USE_UNRELEASED_TOML_FEATURES flag
...
to choose to use unreleased toml feature
2019-09-04 13:32:05 +09:00
ToruNiina
15b68a89c6
fix: suppress warnings by forwarding argument
2019-08-31 13:04:25 +09:00
ToruNiina
1acf87679e
feat: permit leading 0s in exp parts of floats
...
This is an unreleased feature of toml language, but is merged into
toml-lang/toml:master.
2019-08-28 16:02:10 +09:00
ToruNiina
7a1b5bd64e
fix: skip whitespaces without newline
2019-08-26 18:16:09 +09:00
ToruNiina
e332e018db
feat: allow raw tab characters in basic strings
...
This feature is planned to be incorporated in toml v1.0.0 but not
released yet.
2019-08-21 11:19:47 +09:00
ToruNiina
8dded288b4
Merge branch 'master' into find-or-value
2019-08-07 14:58:56 +09:00
ToruNiina
0f491c7f3a
fix: add overload for find_or with toml::value
2019-08-07 14:55:30 +09:00
ToruNiina
cffc605505
fix: stop including iostream
2019-07-23 22:27:20 +09:00
ToruNiina
87e0ba201e
feat: enable to swap comment and strings
2019-07-13 14:33:14 +09:00
ToruNiina
c2435b0d56
feat 💥 : format toml::string as TOML format
2019-06-29 20:19:47 +09:00
ToruNiina
c272188060
fix: check inline table does not include LF
2019-06-29 16:39:54 +09:00
ToruNiina
d5299fef04
feat: add no_comment option to serializer
2019-06-29 14:59:18 +09:00
ToruNiina
0502924d25
feat: add nocomment and showcomment
2019-06-28 19:08:48 +09:00
ToruNiina
3624e4b690
fix: put comment just after non-table values
...
When non-table value is passed to the `operator<<`, it assumes that the
original C++ code looks like the following.
```cpp
std::cout << "key = " << v << std::endl;
```
In this case, the comment associated to `v` should be put just after
`v`, not before.
```toml
key = # comment <= bad
"value"
key = "value" # comment <= good
```
So, if `v` is not a table it would put comments just after the value.
2019-06-28 17:53:19 +09:00
ToruNiina
79e7511871
feat: add format_key to help serialization
2019-06-28 17:47:19 +09:00
ToruNiina
284f122433
refactor: replace for-loop by comment output
2019-06-28 14:58:47 +09:00
ToruNiina
28b3f7d6fb
feat: add ostream operator to comment containers
2019-06-28 14:57:45 +09:00
ToruNiina
6b5fd349aa
fix: initialize source_location correctly
2019-06-26 21:35:01 +09:00
ToruNiina
76e44a0c48
refactor: remove needless inline specifier
2019-06-26 21:34:36 +09:00
ToruNiina
6a251f582e
refactor: remove needless code snippet
2019-06-22 17:52:01 +09:00
ToruNiina
74ef494797
feat: remove unused trait types
2019-06-22 17:35:40 +09:00
ToruNiina
0cee58b0b1
Merge branch 'v3' of github.com:ToruNiina/toml11 into v3
2019-06-21 14:31:52 +09:00
ToruNiina
d4afed5bbb
feat: construct value with a list of comments
2019-06-21 14:26:05 +09:00
ToruNiina
a68543a895
fix: detect comment in stricter way
2019-06-21 13:10:02 +09:00
ToruNiina
ecf55f86d6
refactor: add explicit type conversion
2019-06-21 00:25:57 +09:00
ToruNiina
be2d2aec52
refactor: explicitly convert difference_t to size_t
2019-06-20 23:59:16 +09:00
ToruNiina
be04bf1302
refactor: convert file size to size_t
2019-06-20 23:58:35 +09:00
ToruNiina
427706d671
fix: explicitly add float conversion
2019-06-20 23:58:15 +09:00
ToruNiina
71ff54e76c
fix: rearrange internal int types in datetimes
2019-06-20 23:58:08 +09:00
ToruNiina
8208bbf236
fix: check and convert value manually
...
I totally have no idea when std::count returns a negative value, but the
result type of `std::count` is a differnce_type. So when it is added
with size_t value, implicit sign conversion happens. This changes check
this kind of (almost trivial but required) checking.
2019-06-20 22:27:16 +09:00
ToruNiina
f689d26294
refactor: add conversion function to utf8 encoder
2019-06-20 22:25:40 +09:00
ToruNiina
9e6d8e76d0
fix: replace null deref by terminate for safety
...
Since empty_iterator never points anything, so it always points null
(it returns nullptr by operator->). but dereferencing null causes UB.
Just calling std::terminate is of course better.
2019-06-20 20:56:49 +09:00
ToruNiina
5e5a757208
fix: conversion between different basic_value s
2019-06-20 14:35:38 +09:00
ToruNiina
3379ed82ec
refactor: remove meaningless meta conditions
2019-06-19 20:06:06 +09:00
ToruNiina
9663a6bbdb
Merge branch 'master' into v3
2019-06-19 19:53:08 +09:00
ToruNiina
4a2c823d56
fix: comparison between values that has a table
2019-06-19 19:32:25 +09:00
ToruNiina
24c28c7f4f
fix: correct some SFINAE expressions
2019-06-19 18:59:12 +09:00
ToruNiina
7e5859ba73
Merge branch 'master' into v3
2019-06-19 15:36:27 +09:00
ToruNiina
dee32e7d5e
style: make hint messages clearer
2019-06-19 12:58:34 +09:00
ToruNiina
53a185e7a9
fix: revert misjudgement as a bug
...
Probably I'm too tired.
This reverts commit adcd75e017
.
2019-06-18 21:41:30 +09:00
ToruNiina
fd980a8c5d
🔀 Merge branch 'guess-type-error'
2019-06-18 21:29:45 +09:00
ToruNiina
adcd75e017
fix: correctly initialize offset
2019-06-18 21:27:16 +09:00
ToruNiina
32d5c9e924
fix: serialize array correctly
2019-06-18 01:27:52 +09:00
ToruNiina
262f9c5fcc
fix: avoid duplicating comment: array/table elems
2019-06-18 01:26:40 +09:00
ToruNiina
ca084abe90
feat: consider the first comments as a file comment
2019-06-18 00:44:49 +09:00
ToruNiina
7b1a788e2d
feat: enable to convert vector<string> to comments
2019-06-18 00:43:25 +09:00
ToruNiina
f744a792e2
fix: constructor with array-like types
2019-06-17 23:45:43 +09:00
ToruNiina
bc68a9d9ee
refactor: remove needless include file
2019-06-17 23:07:14 +09:00
ToruNiina
c2b0de623f
feat: enable to convert map-like to toml::value
2019-06-17 22:50:14 +09:00
ToruNiina
af11d56e79
fix: correctly move value from find_or to get_or
2019-06-17 22:40:52 +09:00
ToruNiina
6399d44e3b
fix: consider comments while serialization
2019-06-17 22:13:58 +09:00
ToruNiina
d10c0725fd
fix: consider closing bracket when collect comments
...
table = {key = "value"} # comment.
a value named "table" ({key = "value"}) has the above comment.
but a value named "key" ("value") does not have any comment.
2019-06-17 22:12:20 +09:00
ToruNiina
7eac3a3028
feat: support serialization of basic_value
2019-06-17 20:34:42 +09:00
ToruNiina
57b5545ba2
fix: add _type suffix to value::xxx_type
2019-06-17 20:34:13 +09:00
ToruNiina
f36b39c04f
fix: consider comments while comparing values
2019-06-17 20:33:57 +09:00
ToruNiina
1bfe8f1f54
Merge branch 'master' into guess-type-error
2019-06-17 12:48:36 +09:00
ToruNiina
b3300fad2a
fix: move element of map in toml::find(val&&)
2019-06-17 12:13:59 +09:00
ToruNiina
94bcf0aae9
Merge branch remote into v3
2019-06-17 12:10:45 +09:00
ToruNiina
0ef232a1e0
feat: 💥 remove toml::find_or for toml::table
2019-06-17 01:26:05 +09:00
ToruNiina
0604cf813a
feat: 💥 remove toml::find for tables
2019-06-17 01:24:32 +09:00
ToruNiina
cbaaaaca7c
⏪ revert recursive find function
...
I found that in a user-code (I'm also one of the users of this library),
this new feature sometimes causes an error. Some of my code won't
compile because of this change. Since toml::table is convertible to
toml::value *implicitly*, if toml::find(table, key, tablename) was
called, the overload resolution becomes ambiguous with toml::find(
value, key1, key2). But dropping support for toml::find(toml::table,
key, tablename) is a breaking change. So I concluded that now is not
the right time yet.
2019-06-16 19:55:40 +09:00
ToruNiina
cf1c9371b6
fix: correct example and positions in err msgs
2019-06-16 17:52:42 +09:00
ToruNiina
62e8d58d8d
feat: guess possible format errors
2019-06-16 17:32:29 +09:00
ToruNiina
cc4a9c8d5d
fix: consider identity conversion in SFINAE
2019-06-15 20:20:14 +09:00
ToruNiina
af19dfe032
fix: conversion between different basic_values
2019-06-15 20:19:51 +09:00
ToruNiina
5726d10339
feat: save comment information in value
2019-06-15 17:13:02 +09:00
ToruNiina
a6706f7879
fix: templatize internal function for value
2019-06-15 17:12:30 +09:00
ToruNiina
558349170d
fix: correct the order and remove last CR
2019-06-15 17:11:49 +09:00
ToruNiina
eb4eca86db
feat: 💥 change comment interface in region
2019-06-15 16:11:05 +09:00
ToruNiina
d8a9ee4f72
🔀 Merge branch 'master' into v3
2019-06-15 15:17:08 +09:00
Toru Niina
e66bb3d359
Merge pull request #67 from ToruNiina/hotfix
...
suppress warnings on clang v7+
2019-06-10 10:54:54 +09:00
khoitd1997
2f4f3efbf0
fix sign-compare warning
2019-06-09 12:00:28 -07:00
ToruNiina
06ae67502a
fix: move argument correctly
2019-06-09 21:05:46 +09:00
ToruNiina
6345910c3e
🔀 Merge branch 'master' into v3
2019-06-08 20:05:05 +09:00
ToruNiina
9948549b62
fix: add missing template parameters
2019-06-08 19:53:50 +09:00
ToruNiina
54d46f08c3
🔀 Merge branch 'master' into v3
2019-06-08 19:40:11 +09:00
ToruNiina
57cb806e14
Merge branch 'master' into throw-from-as-something
2019-06-08 19:23:32 +09:00
ToruNiina
4f4d4380f2
feat: throw from as_* if type differs
2019-06-07 19:34:04 +09:00
ToruNiina
31debcb8aa
🔀 Merge branch 'master' into recursive-find
2019-06-07 19:02:20 +09:00
ToruNiina
7db8388d17
fix: avoid deprecated stuff in the internal code
2019-06-07 13:27:10 +09:00
ToruNiina
62c993e096
feat: add as|is_floating and deprecate as|is_float
...
to make the function names consistent with snake_case_typenames
2019-06-07 00:10:12 +09:00
ToruNiina
014d882f8f
feat: enable to find value by recursive search
2019-06-07 00:06:14 +09:00