diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index bcb63c64c11..8d4ecc56f60 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,3 +1,6 @@ +# Unreleased +- [changed] Drop C++14 support, Firestore SDK now requires at least C++17. + # 11.12.0 - [fixed] Fixed the `null` value handling in `isNotEqualTo` and `notIn` filters. diff --git a/Firestore/core/test/unit/util/iterator_adaptors_test.cc b/Firestore/core/test/unit/util/iterator_adaptors_test.cc index 6774d3b260f..1b77e515d07 100644 --- a/Firestore/core/test/unit/util/iterator_adaptors_test.cc +++ b/Firestore/core/test/unit/util/iterator_adaptors_test.cc @@ -82,8 +82,14 @@ class IteratorAdaptorTest : public testing::Test { } template - class InlineStorageIter : public std::iterator { + class InlineStorageIter { public: + using iterator_category = std::input_iterator_tag; + using value_type = T; + using difference_type = std::ptrdiff_t; + using pointer = T*; + using reference = T&; + T* operator->() const { return get(); } @@ -567,9 +573,14 @@ TEST_F(IteratorAdaptorTest, IteratorPtrHasRandomAccessMethods) { EXPECT_EQ(88, value2); } -class MyInputIterator - : public std::iterator { +class MyInputIterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = const int*; + using difference_type = std::ptrdiff_t; + using pointer = const int**; + using reference = const int*; + explicit MyInputIterator(int* x) : x_(x) { } const int* operator*() const { diff --git a/cmake/compiler_setup.cmake b/cmake/compiler_setup.cmake index f214c55ca66..a5b9cfe93d0 100644 --- a/cmake/compiler_setup.cmake +++ b/cmake/compiler_setup.cmake @@ -16,8 +16,8 @@ include(CheckCXXCompilerFlag) # C++ Compiler setup -# We use C++14 -set(CMAKE_CXX_STANDARD 14) +# We use C++17 +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF)