File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ if(POLICY CMP0140)
1919 cmake_policy (SET CMP0140 NEW)
2020endif ()
2121
22- set (CMAKE_CXX_STANDARD 14 CACHE STRING "The C++ standard to use" )
22+ set (CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use" )
2323set (CMAKE_CXX_STANDARD_REQUIRED ON )
2424set (CMAKE_CXX_EXTENSIONS OFF )
2525
Original file line number Diff line number Diff line change @@ -35,6 +35,19 @@ struct planner_multi_meta {
3535struct idx {};
3636struct res_type {};
3737
38+ template <typename T>
39+ struct polyfill_allocator : std::allocator<T> {
40+ using std::allocator<T>::allocator;
41+ template <typename U>
42+ struct rebind {
43+ using other = polyfill_allocator<U>;
44+ };
45+ using pointer = T*;
46+ using const_pointer = T const *;
47+ using reference = T&;
48+ using const_reference = T const &;
49+ };
50+
3851using boost::multi_index_container;
3952using namespace boost ::multi_index;
4053typedef multi_index_container<
@@ -47,7 +60,8 @@ typedef multi_index_container<
4760 tag<res_type>, // index nametag
4861 member<planner_multi_meta, std::string, &planner_multi_meta::resource_type> // index's key
4962 >
50- >
63+ >,
64+ polyfill_allocator<planner_multi_meta>
5165> multi_container;
5266
5367class planner_multi {
You can’t perform that action at this time.
0 commit comments