Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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")

Expand Down
6 changes: 3 additions & 3 deletions src/h5cpp/datatype/factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ namespace datatype {
//! \brief factory function for creating data types
//!
template<typename T>
typename TypeTrait<typename std::remove_const<T>::type>::TypeClass create(const T &v = T()) {
typename TypeTrait<typename std::remove_const<T>::type>::TypeClass create(const T &v = T{}) {
return TypeTrait<typename std::remove_const<T>::type>::create(v);
}
//!
//! \brief factory function for getting reference of data types
//!
template<typename T>
const Datatype & get(const T &v = T()) {
const Datatype & get(const T &v = T{}) {
return TypeTrait<typename std::remove_const<T>::type>::get(v);
}

Expand All @@ -64,7 +64,7 @@ class DLL_EXPORT DatatypeHolder
//! @return data type reference for data type object
//!
template<typename T>
const Datatype & get(const T & v = T());
const Datatype & get(const T & v = T{});

private:
Datatype instance;
Expand Down
16 changes: 16 additions & 0 deletions test/attribute/attribute_multidim_io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ SCENARIO("multidimensional attribute IO") {
}
}
}

AND_GIVEN("a 3 const element array") {
using uint8_const_array = std::array<const std::uint8_t, 3>;
using uint8_array = std::array<std::uint8_t, 3>;
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") {
Expand Down