Skip to content

Commit

Permalink
Remove constexpr from RecordComponent::visit() (#1582)
Browse files Browse the repository at this point in the history
RecordComponent has a virtual base class, so it cannot be constexpr
  • Loading branch information
franzpoeschel authored Dec 22, 2023
1 parent 7296948 commit a3fe9b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions include/openPMD/RecordComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,8 @@ class RecordComponent : public BaseRecordComponent
* be implicitly converted.
*/
template <typename Visitor, typename... Args>
constexpr auto visit(Args &&...args)
-> decltype(Visitor::template call<char>(
std::declval<RecordComponent &>(), std::forward<Args>(args)...));
auto visit(Args &&...args) -> decltype(Visitor::template call<char>(
std::declval<RecordComponent &>(), std::forward<Args>(args)...));

static constexpr char const *const SCALAR = "\vScalar";

Expand Down
2 changes: 1 addition & 1 deletion include/openPMD/RecordComponent.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ namespace detail
} // namespace detail

template <typename Visitor, typename... Args>
constexpr auto RecordComponent::visit(Args &&...args)
auto RecordComponent::visit(Args &&...args)
-> decltype(Visitor::template call<char>(
std::declval<RecordComponent &>(), std::forward<Args>(args)...))
{
Expand Down

0 comments on commit a3fe9b7

Please sign in to comment.