Skip to content

Fix missing 'template' keyword on dependent template names#114

Open
furiousdbd wants to merge 1 commit into
GabrieleGiuseppini:masterfrom
furiousdbd:fix/dependent-template-keyword
Open

Fix missing 'template' keyword on dependent template names#114
furiousdbd wants to merge 1 commit into
GabrieleGiuseppini:masterfrom
furiousdbd:fix/dependent-template-keyword

Conversation

@furiousdbd
Copy link
Copy Markdown

Problem

ShipBuilderLib calls the dependent template member ModelController::CloneExistingLayer<T>() without the template disambiguator. Per [temp.names], the keyword is required when a dependent name is followed by an explicit template argument list.

MSVC accepts the code in its default (permissive) mode, so the Windows build is unaffected — but Clang and GCC reject it:

error: missing 'template' keyword prior to dependent template name 'CloneExistingLayer'

This blocks the build on macOS and on Linux with a recent Clang.

Fix

Adds the template keyword at the three affected call sites:

  • Sources/ShipBuilderLib/Tools/TextureEraserTool.cpp (x2)
  • Sources/ShipBuilderLib/Tools/TextureMagicWandTool.cpp (x1)

No behavior change. Verified with a full build on macOS (Apple Silicon, Clang).

Calls to the dependent template member CloneExistingLayer<T>() omit
the 'template' disambiguator required by [temp.names]. MSVC accepts
this in its default permissive mode, so the Windows build stays green,
but Clang and GCC reject it:

  error: missing 'template' keyword prior to dependent template name
  'CloneExistingLayer'

Add the keyword at the three affected call sites in the texture tools
so the project also builds on conforming compilers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant