Found while upgrading LLVM in ClickHouse (which uses s2geometry).
The code is structured like this:
class S2Polyline {
class OwningShape {
std::unique_ptr<S2Polyline> owned_polyline_;
};
};
libcxx 16 complains that S2Polyline is not defined at the point where
the dtor of the unique_ptr is called (which is OwningShape's implicitly
declared default destructor in the same header file) (also see [0]).
As a remedy, declare OwningShape's destructor in the source file where
the full declaration of S2Polyline is visible.
Found while upgrading LLVM in ClickHouse (which uses s2geometry).
The code is structured like this:
libcxx 16 complains that S2Polyline is not defined at the point where the dtor of the unique_ptr is called (which is OwningShape's implicitly declared default destructor in the same header file) (also see [0]).
As a remedy, declare OwningShape's destructor in the source file where the full declaration of S2Polyline is visible.
[0] https://stackoverflow.com/a/34073093/22422288)