Getting size of a const ArrayType?

Hello,

While trying to use the C++ bindings to HDF5, I ran into a problem
where I have a const ArrayType and I want to get its size. The member
functions

  ArrayType::getArrayNDims
  ArrayType::getArrayDims

are not const. Is there a way to get the size of a const ArrayType
without resorting to a const_cast<>?

Thanks,
Walter Landry

Hi Walter,

That was an oversight. I'll file a bug report for the next release.
Please use const_cast<> in the mean time.

Thank you,
​Binh-Minh

···

________________________________________
From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of Walter Landry <wlandry@caltech.edu>
Sent: Sunday, March 20, 2016 8:38 PM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Getting size of a const ArrayType?

Hello,

While trying to use the C++ bindings to HDF5, I ran into a problem
where I have a const ArrayType and I want to get its size. The member
functions

  ArrayType::getArrayNDims
  ArrayType::getArrayDims

are not const. Is there a way to get the size of a const ArrayType
without resorting to a const_cast<>?

Thanks,
Walter Landry

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5