Skip to content

Commit

Permalink
ParticleContainer::WritePlotFile: Fix enable_if (#3884)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Apr 10, 2024
1 parent 40ed6ef commit a7296f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Src/Particle/AMReX_ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ public:
* \param name The name of the sub-directory for this particle type (i.e. "Tracer")
* \param f callable that returns whether or not to write each particle
*/
template <class F, std::enable_if_t<!std::is_same_v<F, Vector<std::string>&>>* = nullptr>
template <class F, std::enable_if_t<!std::is_same_v<std::decay_t<F>, Vector<std::string>>>* = nullptr>
void WritePlotFile (const std::string& dir, const std::string& name, F&& f) const;

/**
Expand Down Expand Up @@ -887,7 +887,7 @@ public:
* \param real_comp_names for each real component, a name to label the data with
* \param f callable that returns whether or not to write each particle
*/
template <class F, std::enable_if_t<!std::is_same_v<F, Vector<std::string>>>* = nullptr>
template <class F, std::enable_if_t<!std::is_same_v<std::decay_t<F>, Vector<std::string>>>* = nullptr>
void WritePlotFile (const std::string& dir, const std::string& name,
const Vector<std::string>& real_comp_names, F&& f) const;

Expand Down
4 changes: 2 additions & 2 deletions Src/Particle/AMReX_ParticleIO.H
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ WritePlotFile (const std::string& dir, const std::string& name,

template <typename ParticleType, int NArrayReal, int NArrayInt,
template<class> class Allocator, class CellAssignor>
template <class F, std::enable_if_t<!std::is_same_v<F, Vector<std::string>&>>*>
template <class F, std::enable_if_t<!std::is_same_v<std::decay_t<F>, Vector<std::string>>>*>
void
ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>
::WritePlotFile (const std::string& dir, const std::string& name, F&& f) const
Expand Down Expand Up @@ -319,7 +319,7 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig

template <typename ParticleType, int NArrayReal, int NArrayInt,
template<class> class Allocator, class CellAssignor>
template <class F, std::enable_if_t<!std::is_same_v<F, Vector<std::string>>>*>
template <class F, std::enable_if_t<!std::is_same_v<std::decay_t<F>, Vector<std::string>>>*>
void
ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>
::WritePlotFile (const std::string& dir, const std::string& name,
Expand Down

0 comments on commit a7296f3

Please sign in to comment.