Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions framework/include/userobjects/NearestPointBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ NearestPointBase<UserObjectType, BaseType>::NearestPointBase(const InputParamete
{
if (this->template getParam<MooseEnum>("dist_norm") != "radius" &&
parameters.isParamSetByUser("axis"))
this->template paramError("axis",
"'axis' should only be set if 'dist_norm' is set to 'radius'");
this->template paramError<>("axis",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reverendbedford now that I look at this more carefully, I see that all changes are similar to this one. You only made these changes in the solid mechanics module, however. Do you think we need to make similar changes in other modules, too? If so, I wonder if there's another, less intrusive way of fixing this issue...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which compiler requires the <>? I've been trying to find this in the standard, but no luck so far.

Most compilers I tried don't seem to require the <>. Or am I missing something peculiar about the paramError template?

https://godbolt.org/z/6rG365vK8

Copy link
Member

@dschwen dschwen Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually... check this out:
https://godbolt.org/z/8csW6vWe8

Can you try if

Suggested change
this->template paramError<>("axis",
this->paramError("axis",

works for you? I believe this is standard compliant and sufficient because the syntax isn't ambiguous! The template keyword is only required to tell the compiler that the < and > aren't comparison operators. But we shouldn't even supply a <> in the first place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will obviously work, as we already have that variant all over our code...

"'axis' should only be set if 'dist_norm' is set to 'radius'");

fillPoints();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ CombinedScalarDamageTempl<is_ad>::initialSetup()
if (model)
_damage_models.push_back(model);
else
this->template paramError("damage_model",
"Damage Model " + _damage_models_names[i] +
" is not compatible with CombinedScalarDamage");
this->template paramError<>("damage_model",
"Damage Model " + _damage_models_names[i] +
" is not compatible with CombinedScalarDamage");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ HillCreepStressUpdateTempl<is_ad>::HillCreepStressUpdateTempl(const InputParamet
this->isParamValid("creep_prefactor") ? &this->getFunction("creep_prefactor") : nullptr)
{
if (_start_time < this->_app.getStartTime() && (std::trunc(_m_exponent) != _m_exponent))
this->template paramError(
this->template paramError<>(
"start_time",
"Start time must be equal to or greater than the Executioner start_time if a "
"non-integer m_exponent is used");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ LAROMANCEStressUpdateBaseTempl<is_ad>::initialSetup()
_num_inputs,
" inputs detected. Only five or six inputs currently supported.");
if (_num_inputs == 6 && !_environmental)
this->template paramError(
this->template paramError<>(
"environmental_factor",
"Number of ROM inputs indicate environmental factor is required to be coupled.");
if (_num_inputs != 6 && _environmental)
this->template paramError(
this->template paramError<>(
"environmental_factor",
"Number of ROM inputs indicate environmental factor is not implemented, but "
"environmental factor coupled.");
Expand Down
6 changes: 3 additions & 3 deletions modules/solid_mechanics/src/materials/NonlocalDamage.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ NonlocalDamageTempl<is_ad>::initialSetup()
&this->getMaterialByName(_local_damage_model_name));

if (!_local_damage_model)
this->template paramError("damage_model",
"Damage Model " + _local_damage_model_name +
" is not compatible with NonlocalDamage model");
this->template paramError<>("damage_model",
"Damage Model " + _local_damage_model_name +
" is not compatible with NonlocalDamage model");
}

template <bool is_ad>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ RadialReturnStressUpdateTempl<is_ad>::RadialReturnStressUpdateTempl(
if (this->_pars.isParamSetByUser("use_substep"))
{
if (this->_pars.isParamSetByUser("use_substepping"))
this->template paramError(
this->template paramError<>(
"use_substep", "Remove this parameter and just keep `use_substepping` in the input");

if (parameters.get<bool>("use_substep"))
Expand All @@ -109,13 +109,13 @@ RadialReturnStressUpdateTempl<is_ad>::RadialReturnStressUpdateTempl(

if (this->_pars.isParamSetByUser("maximum_number_substeps") &&
_use_substepping == SubsteppingType::NONE)
this->template paramError(
this->template paramError<>(
"maximum_number_substeps",
"The parameter maximum_number_substeps can only be used when the substepping option "
"(use_substepping) is not set to NONE");

if (_adaptive_substepping && _use_substepping == SubsteppingType::NONE)
this->template paramError(
this->template paramError<>(
"adaptive_substepping",
"The parameter adaptive_substepping can only be used when the substepping option "
"(use_substepping) is not set to NONE");
Expand Down
2 changes: 1 addition & 1 deletion modules/solid_mechanics/src/materials/StressUpdateBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ StressUpdateBaseTempl<is_ad, R2, R4>::updateStateSubstep(
bool /*compute_full_tangent_operator*/,
RankFourTensor & /*tangent_operator*/)
{
this->template paramError(
this->template paramError<>(
"use_substep",
"updateStateSubstep called: it needs to be implemented by your inelastic model");
}
Expand Down