Skip to content

Commit dc288a4

Browse files
authored
Add compile time warning for C++14 upgrade (#1219)
* Add compile time warning for C++14 upgrade * Rename cpp warning file and change #warning to #message to avoid "warning as error" * Add release note
1 parent d7ff369 commit dc288a4

File tree

19 files changed

+43
-0
lines changed

19 files changed

+43
-0
lines changed

admob/src/include/firebase/admob.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "firebase/admob/rewarded_video.h"
2929
#include "firebase/admob/types.h"
3030
#include "firebase/app.h"
31+
#include "firebase/cpp_version_warning.h"
3132
#include "firebase/internal/common.h"
3233

3334
#if !defined(DOXYGEN) && !defined(SWIG)

analytics/src/include/firebase/analytics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <string>
2424

2525
#include "firebase/app.h"
26+
#include "firebase/cpp_version_warning.h"
2627
#include "firebase/future.h"
2728
#include "firebase/internal/common.h"
2829
#include "firebase/variant.h"

app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ endif()
251251

252252
set(internal_HDRS
253253
src/include/firebase/app.h
254+
src/include/firebase/cpp_version_warning.h
254255
src/include/firebase/future.h
255256
src/include/firebase/internal/common.h
256257
src/include/firebase/internal/future_impl.h

app/src/include/firebase/app.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_
1818
#define FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_
1919

20+
#include "cpp_version_warning.h"
2021
#include "firebase/internal/platform.h"
2122

2223
#if FIREBASE_PLATFORM_ANDROID
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2023 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#if __cplusplus < 201400
18+
#pragma message \
19+
"The next major release of the Firebase C++ SDK will " \
20+
"drop support for C++11, setting the new minimum C++ version to C++14."
21+
#endif

app_check/src/include/firebase/app_check.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/future.h"
2223

2324
namespace firebase {

auth/src/include/firebase/auth.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "firebase/app.h"
2323
#include "firebase/auth/user.h"
24+
#include "firebase/cpp_version_warning.h"
2425
#include "firebase/future.h"
2526
#include "firebase/internal/common.h"
2627

database/src/include/firebase/database.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define FIREBASE_DATABASE_SRC_INCLUDE_FIREBASE_DATABASE_H_
1717

1818
#include "firebase/app.h"
19+
#include "firebase/cpp_version_warning.h"
1920
#include "firebase/database/common.h"
2021
#include "firebase/database/data_snapshot.h"
2122
#include "firebase/database/database_reference.h"

dynamic_links/src/include/firebase/dynamic_links.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/internal/common.h"
2223

2324
#if !defined(DOXYGEN) && !defined(SWIG)

firestore/src/include/firebase/firestore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "firebase/internal/common.h"
2424

2525
#include "firebase/app.h"
26+
#include "firebase/cpp_version_warning.h"
2627
#include "firebase/future.h"
2728
#include "firebase/log.h"
2829
// Include *all* the public headers to make sure including just "firestore.h" is

0 commit comments

Comments
 (0)