Github user astitcher commented on a diff in the pull request: https://github.com/apache/qpid-proton/pull/35#discussion_r31843690 --- Diff: proton-c/bindings/cpp/include/proton/cpp/Acceptor.h --- @@ -0,0 +1,50 @@ +#ifndef PROTON_CPP_ACCEPTOR_H +#define PROTON_CPP_ACCEPTOR_H + +/* + * + * 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. + * + */ +#include "proton/cpp/ImportExport.h" +#include "proton/cpp/ProtonHandle.h" +#include "proton/reactor.h" + +struct pn_connection_t; + +namespace proton { +namespace reactor { + +class Acceptor : public ProtonHandle<pn_acceptor_t> +{ + public: + PROTON_CPP_EXTERN Acceptor(); + PROTON_CPP_EXTERN Acceptor(pn_acceptor_t *); + PROTON_CPP_EXTERN Acceptor(const Acceptor&); --- End diff -- With C++11 onwards need to consider move construction and move assignment too (this is a general point), so if class is movable (and if it is copyable it probably is moveable too) need to add: `Class(Class&&)`/`Class& operator=(Class&&)` Actually though it would be good C++11 style to declare all 5 special functions for every class even if they are default just to show that we really had thought about it: ```C++ class C { #ifdef __cplusplus >= 201193L C(const C&) = default; // Copy constructor C(C&&) = default; // Move constructor C& operator=(const C&) & = default; // Copy assignment operator C& operator=(C&&) & = default; // Move assignment operator #endif virtual ~C() { } // Destructor ... }; ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---