szaszm commented on a change in pull request #1129:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1129#discussion_r668040767
##########
File path:
thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h
##########
@@ -2509,7 +2953,10 @@ class GenericObject {
GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_;
return *this; }
~GenericObject() {}
+ // the next line is patched by szaszm, in nifi-minifi-cpp, to avoid
ambiguity with the implicit constructor on line 369
+ template <typename U = ValueType> operator typename
std::enable_if<!std::is_convertible<GenericObject&&, U>::value, U&>::type()
const { return value_; }
Review comment:
I patched here. Original:
https://github.com/Tencent/rapidjson/blame/master/include/rapidjson/document.h#L2956
Reason:
```
../libminifi/src/RemoteProcessorGroupPort.cpp:369:30: error: conversion from
'rapidjson::GenericValue<rapidjson::UTF8<>>::Object' (aka 'GenericObject<false,
GenericValue<rapidjson::UTF8<>>>') to 'rapidjson::Value' (aka
'GenericValue<UTF8<>>') is ambiguous
rapidjson::Value controllerValue = itr->value.GetObject();
^ ~~~~~~~~~~~~~~~~~~~~~~
../thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h:872:5:
note: candidate constructor
GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
^
../thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h:2956:5:
note: candidate function
operator ValueType&() const { return value_; }
^
```
(clang-12, linux)
##########
File path:
thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h
##########
@@ -2509,7 +2953,10 @@ class GenericObject {
GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_;
return *this; }
~GenericObject() {}
+ // the next line is patched by szaszm, in nifi-minifi-cpp, to avoid
ambiguity with the implicit constructor on line 872
+ template <typename U = ValueType> operator typename
std::enable_if<!std::is_convertible<GenericObject&&, U>::value, U&>::type()
const { return value_; }
Review comment:
I patched here. Original:
https://github.com/Tencent/rapidjson/blame/master/include/rapidjson/document.h#L2956
Reason:
```
../libminifi/src/RemoteProcessorGroupPort.cpp:369:30: error: conversion from
'rapidjson::GenericValue<rapidjson::UTF8<>>::Object' (aka 'GenericObject<false,
GenericValue<rapidjson::UTF8<>>>') to 'rapidjson::Value' (aka
'GenericValue<UTF8<>>') is ambiguous
rapidjson::Value controllerValue = itr->value.GetObject();
^ ~~~~~~~~~~~~~~~~~~~~~~
../thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h:872:5:
note: candidate constructor
GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
^
../thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include/rapidjson/document.h:2956:5:
note: candidate function
operator ValueType&() const { return value_; }
^
```
(clang-12, linux)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]