Skip to content

Commit

Permalink
Fixing build issue with Linux/Clang/C++23
Browse files Browse the repository at this point in the history
io_base doesn't have a declared destructor, and gets an
automatically generated one. This automatic destructor tries to
destruct the pimpl unique pointer and causes a compilation failure.

Fix: add an explicit destructor with an empty implementation in the
cpp file.
  • Loading branch information
dutow committed Sep 26, 2024
1 parent 8c3a860 commit 2d0ba2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bindings/sail-c++/io_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ io_base::io_base(struct sail_io *sail_io)
{
}

io_base::~io_base()
{
}

int io_base::features() const
{
return d->sail_io_wrapper->features;
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/sail-c++/io_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class SAIL_EXPORT io_base : public abstract_io
*/
explicit io_base(struct sail_io *sail_io);

~io_base();

/*
* Returns the I/O stream features. See SailIoFeature.
*/
Expand Down

0 comments on commit 2d0ba2b

Please sign in to comment.