Mercurial > octave
changeset 30494:ba5370c670d5 stable
make use of <memory_resource> conditional on HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR
* mex.cc: Only include <memory_resource> if
HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR is defined.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 15 Dec 2021 22:07:32 -0500 |
parents | e9a6d3822244 |
children | 358295cdc0a4 fda9f008d212 |
files | libinterp/corefcn/mex.cc |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/mex.cc Wed Dec 15 21:27:18 2021 -0500 +++ b/libinterp/corefcn/mex.cc Wed Dec 15 22:07:32 2021 -0500 @@ -40,7 +40,9 @@ #include <limits> #include <map> -#include <memory_resource> +#if defined (HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR) +# include <memory_resource> +#endif #include <set> #include <string> @@ -337,7 +339,6 @@ }; #if defined (HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR) -# include <memory_resource> class mx_memory_resource : public std::pmr::memory_resource { @@ -368,6 +369,7 @@ // FIXME: Is it OK for the memory resource object to be defined this // way? static mx_memory_resource the_mx_memory_resource; + #endif // ------------------------------------------------------------------