-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from correaa/move-memory-resource
move pmr out of core headers
- Loading branch information
Showing
5 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2018-2024 Alfredo A. Correa | ||
|
||
#ifndef MULTI_ARRAY_PMR_HPP_ | ||
#define MULTI_ARRAY_PMR_HPP_ | ||
|
||
#include <multi/array.hpp> | ||
|
||
#if(!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20210601)) && (!defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION > 14000)) | ||
#include <memory_resource> | ||
#endif | ||
|
||
#if(defined(__cpp_lib_memory_resource) && (__cpp_lib_memory_resource >= 201603)) | ||
namespace boost::multi::pmr { | ||
|
||
template<class T, boost::multi::dimensionality_type D> | ||
using array = boost::multi::array<T, D, std::pmr::polymorphic_allocator<T>>; | ||
|
||
} // end namespace boost::multi::pmr | ||
#else | ||
namespace boost::multi::pmr { | ||
template<class T, boost::multi::dimensionality_type D> | ||
struct [[deprecated("no PMR allocator")]] array; // your version of C++ doesn't provide polymorphic_allocators | ||
} // end namespace boost::multi::pmr | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters