adamdebreceni commented on a change in pull request #887:
URL: https://github.com/apache/nifi-minifi-cpp/pull/887#discussion_r481955772
##########
File path: libminifi/include/utils/GeneralUtils.h
##########
@@ -68,6 +68,21 @@ using void_t = void;
using std::void_t;
#endif /* < C++17 */
+namespace internal {
+
+struct safe_enable_shared_from_this_base :
std::enable_shared_from_this<safe_enable_shared_from_this_base> {
+ virtual ~safe_enable_shared_from_this_base() = default;
+};
+
+} // namespace internal
+
+template<typename T>
+struct safe_enable_shared_from_this : virtual
internal::safe_enable_shared_from_this_base {
+ std::shared_ptr<T> shared_from_this() {
Review comment:
agree about the need for renaming, but wouldn't
`enable_shared_from_parent` be strange if it is the only thing we are
inheriting from?
```
struct A: utils::enable_shared_from_parent<A>{
void f(){
shared_from_parent();
}
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]