https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124735
--- Comment #1 from Seb James <sebj_coder3 at pm dot me> ---
I've got a minimal client program that at least shows the problem is in the
compilation of the HexGridVisual.cppm module.
The new target is 'hexgridbug', whose code file, hexgridbug.cpp is:
import mplot.hexgridvisual; // Problem occurs compiling this module
(mplot/HexGridVisual.cppm)
int main() { return 0; }
New steps to reproduce:
# Dependencies are OpenGL, Freetype and GLFW (only for the top level
CMakeLists,
# the bug-generating code won't use these). Run your distro's equivalent of the
# Debian-like:
sudo apt install ninja-build \
librapidxml-dev freeglut3-dev libglu1-mesa-dev libxmu-dev \
libxi-dev libglfw3-dev libfreetype-dev
# Clone mathplot
git clone [email protected]:sebsjames/mathplot
cd mathplot
# Check out the modules_cpp20 branch and init/update two submodules
git checkout dev/modules # Commit 6590269, dated 2026/03/31
git submodule init
git submodule update
mkdir build
cd build
# Configure.
CC=/path/to/gcc CXX=/path/to/g++ cmake .. -GNinja -DBUILD_BUGREP=ON
# Build the 'hexgridbug' program that triggers the -Wtemplate-body:
ninja hexgridbug