mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Replace type aliases deprecated/removed in C++17/C++20 from FixedArray
- Raised as issue #551 - Also adds C++20 to the set of ALLOWED_CXX_STANDARDS, although this will require a version of CMake >= 3.12. Change-Id: I0f13c72e93a35391fd2d18590b4243a329a2322c
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ set(CMAKE_CXX_STANDARD ${DEFAULT_CXX_STANDARD} CACHE STRING
|
||||
"C++ standard (minimum 11)" FORCE)
|
||||
# Restrict CMAKE_CXX_STANDARD to the valid versions permitted and ensure that
|
||||
# if one was forced via -D that it is in the valid set.
|
||||
set(ALLOWED_CXX_STANDARDS 11 14 17)
|
||||
set(ALLOWED_CXX_STANDARDS 11 14 17 20)
|
||||
set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS ${ALLOWED_CXX_STANDARDS})
|
||||
list(FIND ALLOWED_CXX_STANDARDS ${CMAKE_CXX_STANDARD} POSITION)
|
||||
if (POSITION LESS 0)
|
||||
|
||||
@@ -105,13 +105,13 @@ class FixedArray {
|
||||
|
||||
public:
|
||||
using allocator_type = typename AllocatorTraits::allocator_type;
|
||||
using value_type = typename allocator_type::value_type;
|
||||
using pointer = typename allocator_type::pointer;
|
||||
using const_pointer = typename allocator_type::const_pointer;
|
||||
using reference = typename allocator_type::reference;
|
||||
using const_reference = typename allocator_type::const_reference;
|
||||
using size_type = typename allocator_type::size_type;
|
||||
using difference_type = typename allocator_type::difference_type;
|
||||
using value_type = typename AllocatorTraits::value_type;
|
||||
using pointer = typename AllocatorTraits::pointer;
|
||||
using const_pointer = typename AllocatorTraits::const_pointer;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using size_type = typename AllocatorTraits::size_type;
|
||||
using difference_type = typename AllocatorTraits::difference_type;
|
||||
using iterator = pointer;
|
||||
using const_iterator = const_pointer;
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
|
||||
Reference in New Issue
Block a user