Closed
Description
Describe the bug
Error when building cppfront
due to a static declaration within a class that uses the full type of the class itself.
source/parse.h:1029:50: note: in instantiation of member function 'std::vector<cpp2::template_argument>::~vector' requested here
static inline std::vector<template_argument> no_template_args;
^
source/parse.h:1015:8: note: definition of 'cpp2::template_argument' is not complete until the closing '}'
struct template_argument
The error shows compiling cppfront
on a MacOS, older compilers are less strict and this might be the reason why the error has crept in. It still appears to be a true problem.
To Reproduce
On a MacOS jus build cppfront
g++ source/cppfront.cpp -std=c++20 -o cppfront
Additional context
The version of the compiler is the following.
> g++ --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin