Skip to content

Commit

Permalink
Simplify syntax in nda/h5.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jul 30, 2024
1 parent 43fc60a commit 552473d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c++/nda/h5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace nda {
*/
template <MemoryArray A>
void h5_write(h5::group g, std::string const &name, A const &a, bool compress = true) {
if constexpr (std::is_same_v<std::remove_cvref_t<typename A::value_type>, std::string>) {
if constexpr (std::is_same_v<nda::get_value_t<A>, std::string>) {
// 1-dimensional array/view of strings
h5_write(g, name, detail::to_char_buf(a));
} else if constexpr (is_scalar_v<typename A::value_type>) {
Expand Down

0 comments on commit 552473d

Please sign in to comment.