Explicitly specify OCResourceIdentifier assignments/ctors
authorErich Keane <erich.keane@intel.com>
Wed, 25 Mar 2015 23:46:28 +0000 (16:46 -0700)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Fri, 27 Mar 2015 01:39:39 +0000 (01:39 +0000)
The OCResourceIdentifier proxy class depends on compiler rules
to determine validity of constructors and assignments.  This patch
correctly explicitly specifies these values.

Note: This patch does NOT change any behavior or functionality, it
solely specifies behavior explicitly rather than implicitly.

Change-Id: I5110cb10e07112e7786c56fedee43f76cfdab3bd
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/572
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/include/OCResource.h

index 6d388743116d524681599793a14320d50733366d..ff4a08073652330eea9c1b9383e0ced44e12a67e 100644 (file)
@@ -56,6 +56,16 @@ namespace OC
         friend std::ostream& operator <<(std::ostream& os, const OCResourceIdentifier& ri);
 
         public:
+            OCResourceIdentifier() = delete;
+
+            OCResourceIdentifier(const OCResourceIdentifier&) = default;
+
+            OCResourceIdentifier(OCResourceIdentifier&&) = default;
+
+            OCResourceIdentifier& operator=(const OCResourceIdentifier&) = delete;
+
+            OCResourceIdentifier& operator=(OCResourceIdentifier&&) = delete;
+
             bool operator==(const OCResourceIdentifier &other) const;
 
             bool operator!=(const OCResourceIdentifier &other) const;