Skip to content

error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] #3557

Closed

Description

@bsdforge

Describe the bug
A clear and concise description of what the bug is.
I maintain this port on FreeBSD. It no longer builds as a result of this error.
To Reproduce
Steps to reproduce the behavior:

  1. cd /usr/ports/graphics/synfig
  2. execute make
  3. build fails with the error indicated in the subject of this issue

Expected behavior
A clear and concise description of what you expected to happen.
It has always built correctly in the past. It should continue to build.
Screenshots
If applicable, add screenshots to help explain your problem.

System information:

  • OS: FreeBSD
  • OS version: 13,14,15
  • Synfig version: 1.4.5

Additional comments
This appears to be induced by a boost version change. eg;
this problem only started with the introduction of 1.86. 1.85
didn't exhibit this problem.

GRAPHICS_SYNFIG_BUILD_SESSION.log

Activity

  1. BobSynfig commented on Apr 14, 2025

    @BobSynfig
    Collaborator

    Did you try -Wno-missing-template-arg-list-after-template-kw?
    See llvm/llvm-project#101079 / llvm/llvm-project#94194, it seems this is a bug in some compilers / linters

    --extra-arg-before=-Wno-missing-template-arg-list-after-template-kw

  2. rodolforg commented on Apr 14, 2025

    @rodolforg
    Contributor

    Wow. I couldn't imagine such a syntax exists in C++ XD

    I can't test it right now, but I believe this template argument would solve the issue:

    	void fill(const Type &x) const
    		{ for(Iterator i(*this); i; ++i) i.get_array().template fill<Type>(x); }
  3. bsdforge commented on Apr 15, 2025

    @bsdforge
    Author

    @BobSynfig . I was tempted to try that. But it felt like putting a band-aid on a broken arm --
    works, but masks the real problem. But I just did it now, anyway. Good news. It exposed
    part of the underlying problem; bumping compiler options to 14 allowed the build to complete.
    However, -Wno-missing-template-arg-list-after-template-kw was still required.

    @rodolforg . Those were my thoughts as well. I experimented with that line for awhile
    w/o success. So (out of laziness) came here. :)
    I can easily try your proposal. I'll report my findings shortly.

    Thank you both for all your time and consideration!

  4. bsdforge commented on Apr 15, 2025

    @bsdforge
    Author

    @rodolforg . CONFIRMED! Defining template argument as (not surprisingly) <Type> solves it.
    -Wno-missing-template-arg-list-after-template-kw no longer required.
    I think we can close this as SOLVED. Looking forward to seeing the change
    merged soon. :)

    Thanks!

  5. added a commit that references this issue on Apr 15, 2025
    eab2ef6
  6. added a commit that references this issue on May 15, 2025
    4ae4fd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions