Skip to content

Commit

Permalink
Improving compatability for some compilers which seem to incorrectly …
Browse files Browse the repository at this point in the history
…handle const auto&.

This change has no effect.

PiperOrigin-RevId: 571953171
  • Loading branch information
jwhpryor authored and copybara-github committed Oct 10, 2023
1 parent fa0439b commit 257ac41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion implementation/jni_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,13 @@ struct JniT {
}
}

// Some compilers seem to only be OK if this indirection is used.
static constexpr auto& kMinimalSpanningClass = MinimalSpanningClass();
static constexpr auto& kMinimalSpanningClassLoader =
MinimalSpanningClassLoader();

using MinimallySpanningType =
JniT<SpanType_, MinimalSpanningClass(), MinimalSpanningClassLoader(),
JniT<SpanType_, kMinimalSpanningClass, kMinimalSpanningClassLoader,
jvm_v_, kRank, MinimalClassIdx(), MinimalClassLoaderIdx()>;
};

Expand Down

0 comments on commit 257ac41

Please sign in to comment.