boostorg / boostorg/config

Add check for pmr default_ressource related functions

Open
#527 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
80
Forks
184
Avg merge
1h 16m
Merged PRs (30d)
3

Description

Some versions of `libc++` on Apple are missing the implementation of the `pmr::get_default_resource()`. Some Boost.GIL tests are impacted and discussed in https://github.com/boostorg/gil/pull/778.

In CMake terms, the check would look something like this:

```
check_cxx_source_compiles( "
#include <${pmr_include}>
int main() {
${pmr_ns}::set_default_resource(nullptr);
${pmr_ns}::memory_resource* mr = ${pmr_ns}::get_default_resource();
return 0;
}
"BOOST_HAVE_DEFAULT_RESOURCE)
```

A polyfill would be easy to add for the missing symbols.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.