We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fe12b4 commit 909e508Copy full SHA for 909e508
stan/math/prim/fun/promote_scalar.hpp
@@ -44,9 +44,10 @@ inline constexpr auto promote_scalar(UnPromotedTypes&& x) {
44
} else if constexpr (is_stan_scalar_v<UnPromotedTypes>) {
45
return PromotionScalars(std::forward<UnPromotedTypes>(x));
46
} else {
47
- throw std::domain_error(
48
- "promote_scalar: "
49
- "Unrecognized type for promotion");
+ static_assert(sizeof(std::decay_t<UnPromotedTypes>*) == 0,
+ "promote_scalar: Unrecognized type for promotion. "
+ "This is an internal error, please report it to the stan "
50
+ "github as an issue.");
51
}
52
53
0 commit comments