Skip to content

Commit

Permalink
Include <memory> for std::unique_ptr
Browse files Browse the repository at this point in the history
LLVM's libc++ is removing transitive inclusions among std header files in newer C++ versions, so user code must explicitly include needed std header files. In this case, cubeb_opensl.cpp must explicitly include <memory> for `std::unique_ptr` because, starting in C++23, <vector> no longers includes <memory>.

https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html

```
libcubeb/src/cubeb_opensl.cpp:140:8: error: no template named 'unique_ptr' in namespace 'std'
  140 |   std::unique_ptr<cubeb_stream_params> input_params;
      |   ~~~~~^
```
  • Loading branch information
cpeterso authored and padenot committed Jun 4, 2024
1 parent dabff20 commit 42cf706
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cubeb_opensl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <dlfcn.h>
#include <errno.h>
#include <math.h>
#include <memory>
#include <pthread.h>
#include <stdlib.h>
#include <time.h>
Expand Down

0 comments on commit 42cf706

Please sign in to comment.