Skip to content

Update the minimum version from C++14 to C++17 #15074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
17 changes: 14 additions & 3 deletions Firestore/core/test/unit/util/iterator_adaptors_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,14 @@ class IteratorAdaptorTest : public testing::Test {
}

template <typename T>
class InlineStorageIter : public std::iterator<std::input_iterator_tag, T> {
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();
}
Expand Down Expand Up @@ -567,9 +573,14 @@ TEST_F(IteratorAdaptorTest, IteratorPtrHasRandomAccessMethods) {
EXPECT_EQ(88, value2);
}

class MyInputIterator
: public std::iterator<std::input_iterator_tag, const int*> {
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 {
Expand Down
4 changes: 2 additions & 2 deletions cmake/compiler_setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading