Skip to content

Commit

Permalink
is_indexable_v is wrong order...
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahm-LANL committed Feb 25, 2025
1 parent c3344d6 commit f312737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion singularity-eos/base/indexable_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace IndexerUtils {
// natural number index depending on what is available
template <typename T, typename Indexer_t>
PORTABLE_FORCEINLINE_FUNCTION auto &Get(Indexer_t &&lambda, std::size_t idx = 0) {
if constexpr (variadic_utils::is_indexable_v<T, Indexer_t>) {
if constexpr (variadic_utils::is_indexable_v<Indexer_t, T>) {
return lambda[T()];
} else {
return lambda[idx];
Expand Down
2 changes: 1 addition & 1 deletion singularity-eos/eos/modifiers/zsplit_eos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class ZSplit : public EosBase<ZSplit<ztype, T>> {
PORTABLE_THROW_OR_ABORT(
"StellarCollapse: lambda must contain Ye and 1 space for caching.\n");
}
if constexpr (is_indexable_v<IndexableTypes::MeanIonizationState, Indexer_t>) {
if constexpr (is_indexable_v<Indexer_t, IndexableTypes::MeanIonizationState>) {
return std::max(0.0, lambda[IndexableTypes::MeanIonizationState()]);
} else {
return std::max(0.0, lambda[t_.nlambda()]);
Expand Down

0 comments on commit f312737

Please sign in to comment.