From issues-return-96731-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Mon May 4 14:52:29 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8F3ED180608 for ; Mon, 4 May 2020 16:52:29 +0200 (CEST) Received: (qmail 55573 invoked by uid 500); 4 May 2020 14:52:29 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 55564 invoked by uid 99); 4 May 2020 14:52:28 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2020 14:52:28 +0000 From: =?utf-8?q?GitBox?= To: issues@nifi.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bnifi-minifi-cpp=5D_szaszm_commented_on_a_change_in?= =?utf-8?q?_pull_request_=23773=3A_MINIFICPP-1202_-_Extend_interface_and_add?= =?utf-8?q?_new_tests_for_MinifiConcurrentQueue?= Message-ID: <158860394882.26397.8655420447733606196.asfpy@gitbox.apache.org> Date: Mon, 04 May 2020 14:52:28 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: szaszm commented on a change in pull request #773: URL: https://github.com/apache/nifi-minifi-cpp/pull/773#discussion_r419481789 ########## File path: libminifi/include/utils/Void_t.h ########## @@ -0,0 +1,17 @@ +#pragma once Review comment: I feel it a bit of overkill to have a separate file for such a tiny utility. I would just put `void_t` in GeneralUtils.h next to the other polyfills. ########## File path: libminifi/include/utils/Void_t.h ########## @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +namespace org { +namespace apache { +namespace nifi { +namespace minifi { +namespace utils { + +// ppartial detection idiom impl Review comment: `void_t` is used by, but not really part of the detection idiom. Could you move the comment line back to StringUtils.h? I forgot to add a reference to cppreference.com in the original. When moving it back, could you please append `, from cppreference.com` to the comment and fix the typo (`s/ppartial/partial/`)? So my ask summarized: - remove this comment line - Add the line below to where it was removed from: ``` // partial detection idiom impl, from cppreference.com ``` ########## File path: libminifi/include/utils/TryMoveCall.h ########## @@ -0,0 +1,61 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include + +#include // NOLINT + +namespace org { +namespace apache { +namespace nifi { +namespace minifi { +namespace utils { + +// TryMoveCall calls an +// - unary function of a lvalue reference-type argument by passing a ref +// - unary function of any other argument type by moving into it +template +struct TryMoveCall { Review comment: If we decouple this from the queue, we should consider making it handle return values (other than `void`). ########## File path: libminifi/include/utils/MinifiConcurrentQueue.h ########## @@ -21,20 +21,23 @@ #include #include #include +#include #include +#include Review comment: `` is no longer used since `TryMoveCall` and `void_t` were extracted. Please fix headers to follow `include-what-you-use` rationale: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf11-header-files-should-be-self-contained If `utils/TryMoveCall.h` were not self-contained, following iwyu would more likely expose the issue in the form of compilation caure. ---------------------------------------------------------------- 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: users@infra.apache.org