diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml index f3000d3671..08be5775e6 100644 --- a/.github/workflows/cmake-build.yml +++ b/.github/workflows/cmake-build.yml @@ -89,9 +89,7 @@ jobs: strategy: matrix: shared: ["shared", "static"] - boost: [ - # "boost", - "stdfs"] + boost: ["boost", "stdfs"] runs-on: windows-2019 steps: - uses: actions/checkout@v2 @@ -141,9 +139,7 @@ jobs: strategy: matrix: shared: ["shared", "static"] - boost: [ - # "boost", - "stdfs"] + boost: ["boost", "stdfs"] mpi: ["serial", "mpi"] runs-on: macos-10.15 steps: diff --git a/conanfile.py b/conanfile.py index b25ebeaba1..5a3f6de1ca 100644 --- a/conanfile.py +++ b/conanfile.py @@ -26,9 +26,6 @@ def build_requirements(self): def config_options(self): if self.settings.os == "Windows": del self.options.with_mpi - del self.options.with_boost - if self.settings.os == "Macos": - del self.options.with_boost def configure(self): if self.options.get_safe("with_mpi", False): @@ -42,7 +39,7 @@ def requirements(self): elif self.settings.os == "Macos": self.requires("boost/1.77.0") else: - self.requires("boost/1.77.0@#35c2c19753eaadacfb846c7198919da7") + self.requires("boost/1.77.0") if self.options.get_safe("with_mpi", False): self.requires("openmpi/4.1.0") diff --git a/src/h5cpp/datatype/factory.hpp b/src/h5cpp/datatype/factory.hpp index dc786ed58a..7754713952 100644 --- a/src/h5cpp/datatype/factory.hpp +++ b/src/h5cpp/datatype/factory.hpp @@ -36,14 +36,14 @@ namespace datatype { //! \brief factory function for creating data types //! template -typename TypeTrait::type>::TypeClass create(const T &v = T()) { +typename TypeTrait::type>::TypeClass create(const T &v = T{}) { return TypeTrait::type>::create(v); } //! //! \brief factory function for getting reference of data types //! template -const Datatype & get(const T &v = T()) { +const Datatype & get(const T &v = T{}) { return TypeTrait::type>::get(v); } @@ -64,7 +64,7 @@ class DLL_EXPORT DatatypeHolder //! @return data type reference for data type object //! template - const Datatype & get(const T & v = T()); + const Datatype & get(const T & v = T{}); private: Datatype instance; diff --git a/test/attribute/attribute_multidim_io_test.cpp b/test/attribute/attribute_multidim_io_test.cpp index 3b1a04eb8d..ea1fcb32f9 100644 --- a/test/attribute/attribute_multidim_io_test.cpp +++ b/test/attribute/attribute_multidim_io_test.cpp @@ -69,6 +69,22 @@ SCENARIO("multidimensional attribute IO") { } } } + + AND_GIVEN("a 3 const element array") { + using uint8_const_array = std::array; + using uint8_array = std::array; + uint8_const_array write_data{3, 4, 5}; + THEN("writing this data should work") { + REQUIRE_NOTHROW(a.write(write_data)); + AND_THEN("reading the data back should yield {3,4,5}") { + uint8_array read_data; + REQUIRE_NOTHROW(a.read(read_data)); + REQUIRE(write_data[0] == read_data[0]); + REQUIRE(write_data[1] == read_data[1]); + REQUIRE(write_data[2] == read_data[2]); + } + } + } } GIVEN("an integer attribute with 4 elements") {