diff options
author | Chris Peterson <[email protected]> | 2024-06-03 22:06:07 -0700 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2024-06-04 17:45:46 +0200 |
commit | 42cf7061fcea5fd6178d6affe27da4a388346bda (patch) | |
tree | a5648fdd0ecac275c7a60650e2aacab65f34594b | |
parent | dabff209ddc97c5d1c304e64107d0c8c1dbe6897 (diff) | |
download | cubeb-42cf7061fcea5fd6178d6affe27da4a388346bda.tar.gz cubeb-42cf7061fcea5fd6178d6affe27da4a388346bda.zip |
Include <memory> for std::unique_ptr
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;
| ~~~~~^
```
-rw-r--r-- | src/cubeb_opensl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cubeb_opensl.cpp b/src/cubeb_opensl.cpp index f9914ea..d8c9681 100644 --- a/src/cubeb_opensl.cpp +++ b/src/cubeb_opensl.cpp @@ -10,6 +10,7 @@ #include <dlfcn.h> #include <errno.h> #include <math.h> +#include <memory> #include <pthread.h> #include <stdlib.h> #include <time.h> |