-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
First of all .. thanks to everyone who contributes to these tools.
Unfortunately I have run into a problem with atdcpp when using recursive types. Given the following (recurisive.atd):
type expr = [
| Int of int
| Negate of expr
]
I can run atdcpp to produce recursive_atd.cpp and recursive_atd.hpp. Compiling with:
g++ -c -I ~/Work/rapidjson/include -std=c++17 recusive_atd.cpp
yields a ton of error messages including:
/usr/include/c++/8/type_traits:1222:12: error: invalid use of incomplete type ‘struct atd::Expr::Types::Negate’
struct is_trivially_destructible
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from recusive_atd.cpp:12:
recusive_atd.hpp:46:16: note: forward declaration of ‘struct atd::Expr::Types::Negate’
struct Negate
^~~~~~
which to me, as a newbie C++ developer, suggests trouble with the forward declarations.
Metadata
Metadata
Assignees
Labels
No labels