hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.24k stars 224 forks source link

removed harmfull check in out<T> #1014

Closed ARG-Helper closed 3 months ago

ARG-Helper commented 3 months ago

fixes #1012 by removing the check that ignored the invariant called_construct() implies dt->init

hsutter commented 3 months ago

Thanks! I think the check is necessary... the reason it exists is because of the case when an uninitialized variable is initialized via a chain of calls through out parameters. It's possible I could restructure the code to use just the flag already inside deferred_init, in the future.

However, this has helped me see that I need to clarify that some things in cpputil.h) are, and others aren't, intended for users to use directly. So I've put the latter into an impl namespace in this commit: 7fd706de88b57857af4d5a31c8dc5429535d367f

Thanks!