summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSet.h
diff options
context:
space:
mode:
authorLee Newberg <35611400+Leengit@users.noreply.github.com>2021-05-19 20:48:20 (GMT)
committerGitHub <noreply@github.com>2021-05-19 20:48:20 (GMT)
commitd179f9d79ca9ed3f94715b907e3d8426a26ee766 (patch)
tree558c0a42a83f5a297cbacf973ca013828cf2cc87 /c++/src/H5DataSet.h
parenta5d1897225305fb870761822834f53d3d27fd416 (diff)
downloadhdf5-d179f9d79ca9ed3f94715b907e3d8426a26ee766.zip
hdf5-d179f9d79ca9ed3f94715b907e3d8426a26ee766.tar.gz
hdf5-d179f9d79ca9ed3f94715b907e3d8426a26ee766.tar.bz2
BUG: DataSet assignment operator is missing (#503)
* BUG: DataSet assignment operator is missing * Some compilers complain if the copy constructor is given explicitly but the assignment operator is implicitly set to default. * Explicitly defining the assignment operator allows us to properly handle reference counters for shared resources. * BUG: DataSet assignment operator is missing. * Mimicking code of H5DataType::operator() as suggested by @bmribler. * Added test Description: Added test for DataSet::operator= that Leengit added Platform tested: Linux/64 (jelly) * Removed Author field. * Commit clang format changes. * Entry for Leengit's github PR #503 * Removed lines left by mistake Co-authored-by: Binh-Minh Ribler <bmribler@hdfgroup.org> Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'c++/src/H5DataSet.h')
-rw-r--r--c++/src/H5DataSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 619bc30..d50b2c5 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -117,6 +117,9 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Copy constructor - same as the original DataSet.
DataSet(const DataSet &original);
+ // Assignment operator
+ DataSet &operator=(const DataSet &original);
+
// Creates a copy of an existing DataSet using its id.
DataSet(const hid_t existing_id);