Merge branch 'master' into 6.x

This commit is contained in:
Benoit Blanchon
2018-10-09 15:00:49 +02:00
5 changed files with 20 additions and 5 deletions

View File

@ -97,11 +97,19 @@ matrix:
- compiler: gcc
env: SCRIPT=coverage
- os: osx
osx_image: xcode6.4
osx_image: xcode7.3
compiler: clang
env: SCRIPT=cmake
- os: osx
osx_image: xcode7.3
osx_image: xcode8.3
compiler: clang
env: SCRIPT=cmake
- os: osx
osx_image: xcode9.4
compiler: clang
env: SCRIPT=cmake
- os: osx
osx_image: xcode10
compiler: clang
env: SCRIPT=cmake SANITIZE=address
- env: SCRIPT=arduino VERSION=1.6.7 BOARD=arduino:avr:uno

View File

@ -9,6 +9,7 @@ HEAD
* Fixed object keys not being duplicated
* `JsonPair::key()` now returns a `JsonKey`
* Increased the default capacity of `DynamicJsonDocument`
* Fixed `JsonVariant::is<String>()` (closes #763)
v6.4.0-beta (2018-09-11)
-----------
@ -87,6 +88,7 @@ v6.2.0-beta (2018-07-12)
-----------
* Disabled lazy number deserialization (issue #772)
* Fixed `JsonVariant::is<int>()` that returned true for empty strings
* Improved float serialization when `-fsingle-precision-constant` is used
* Renamed function `RawJson()` to `serialized()`
* `serializeMsgPack()` now supports values marked with `serialized()`

View File

@ -1,4 +1,4 @@
version: 6.0.1.{build}
version: 6.4.0.{build}
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017

View File

@ -305,9 +305,13 @@ class JsonVariant : public JsonVariantBase<JsonVariant> {
//
// bool is<const char*>() const;
// bool is<char*>() const;
// bool is<std::string>() const;
// bool is<String>() const;
template <typename T>
FORCE_INLINE typename enable_if<
is_same<T, const char *>::value || is_same<T, char *>::value, bool>::type
FORCE_INLINE typename enable_if<is_same<T, const char *>::value ||
is_same<T, char *>::value ||
IsWriteableString<T>::value,
bool>::type
is() const {
return _data && (_data->type == JSON_LINKED_STRING ||
_data->type == JSON_OWNED_STRING);

View File

@ -79,6 +79,7 @@ void checkIsString(const char *value) {
var.set(value);
REQUIRE(var.is<const char *>());
REQUIRE(var.is<std::string>());
REQUIRE_FALSE(var.is<bool>());
REQUIRE_FALSE(var.is<int>());