tt4g
283d06f9f7
Fix warning C4127 on Visual Studio ( #672 )
...
Splitting the condition of the if statement containing `constant expression` eliminates warnings in Visual Studio with /W4.
2019-02-13 09:39:59 -06:00
Simon Gene Gottlieb
abf941b20d
Fix float precision ( #649 )
...
The issue is that numbers like
2.01 or 3.01 can not be precisely represented with binary floating point
numbers.
This replaces all occurrences of 'std::numeric_limits<T>::digits10 + 1' with
'std::numeric_limits<T>::max_digits10'.
Background:
Using 'std::numeric_limits<T>::digits10 + 1' is not precise enough.
Converting a 'float' into a 'string' and back to a 'float' will not always
produce the original 'float' value. To guarantee that the 'string'
representation has sufficient precision the value
'std::numeric_limits<T>::max_digits10' has to be used.
2018-12-21 09:05:19 -05:00
Jesse Beder
b5b03bb9ad
Run clang-format.
2016-10-12 00:00:39 -05:00
Vincent Cogne
7c33b3cdab
Add convert specialization for std::array.
2016-06-12 21:59:31 -05:00
Michael Welsh Duggan
320b02b14a
Allow using a Node as the key in force_insert.
...
Node::force_insert() uses convert<> to convert its key to a node.
Add a specialization for convert<Node>.
2015-11-22 11:21:08 -06:00
Jesse Beder
25c466a152
Run clang-format
2015-03-29 21:27:20 -05:00
Jesse Beder
fcbec237c9
Add conversion for signed char
2015-01-24 15:19:49 -06:00
Jesse Beder
13130ec20d
clang-format
2014-03-25 00:11:17 -05:00
Jesse Beder
066359802b
Merge from core, and update several missing DLL exports. This does not resolve them all (in particular, node_data::equals seems to be still missing, even though it is inlined in a header, which seems strange).
2014-03-24 00:31:43 -05:00
Jesse Beder
4b40441cee
Run IWYU
2014-03-22 23:14:48 -05:00
Jesse Beder
d63ec48c8a
Run clang-format
2014-03-22 13:05:03 -05:00
Jesse Beder
5b88931143
Fixed bug while reading a single space char
2013-11-10 14:50:35 -06:00
Jesse Beder
895af26226
Fix floating point precision on input.
2013-04-13 13:10:36 -05:00
Jesse Beder
097ac171c6
Add std::pair conversion specialization.
2013-04-02 21:04:17 -05:00
Jesse Beder
5dbcf7eeb1
Fix conversion for C-strings (both literals and normal C-strings) so it compiles on Visual Studio.
2013-04-01 22:25:53 -05:00
Jesse Beder
04937649b7
Add missing line from previous fix.
2013-04-01 21:52:32 -05:00
Jesse Beder
71f35b1104
Fix warning in Visual Studio:
...
warning C4146: unary minus operator applied to unsigned type, result still unsigned
2013-04-01 21:43:09 -05:00
Jesse Beder
a03e861d8c
Switched map's convert<> specialization to use the new force_insert
2012-10-31 19:10:45 -05:00
Jeff Wang
d770a7dc97
workaround for gcc 3
2012-07-17 11:55:45 -05:00
Jesse Beder
c22512649e
Copied all files from new-api branch of old repo
2012-05-19 15:34:02 -05:00
Jesse Beder
1723523c43
Removed the new API from the default branch
2012-01-20 23:50:39 -06:00
Jesse Beder
643ea61a98
Updated new API conversion to handle nan/inf and to throw when the conversion didn't use the entire string (e.g., parsing 1.2 as an integer)
2012-01-12 23:49:05 -06:00
Jesse Beder
f64f619c29
Added bool conversions
2011-09-14 01:48:36 -05:00
Jesse Beder
0987b234c3
Added tags to Node
2011-09-13 14:00:47 -05:00
Jesse Beder
2dfccbb945
Added a convert<> specialization for YAML::_Null (so you can say node[YAML::Null])
2011-09-13 02:03:56 -05:00
Jesse Beder
5397a93702
Implemented std::map decode (and fixed bug in the Node iterator - the reference_type should be just a plain value, since it's created on-the-fly)
2011-09-12 00:29:39 -05:00
Jesse Beder
b9583dde76
Added reading/writing std::list
2011-09-11 23:18:19 -05:00
Jesse Beder
f22f38f7f2
Added reading/writing std::vector
2011-09-11 23:14:52 -05:00
Jesse Beder
0d1b5224c8
Major switch from Value -> Node. The library compiles with the new API, but tests are still oldies, and don't compile
2011-09-10 17:57:23 -05:00
Jesse Beder
ac81d7c883
Start of moving Value -> Node and Node -> old API Node (with a #define toggle)
2011-09-10 17:18:15 -05:00