Skip to content

Commit 608a909

Browse files
authored
fix: build error with c++17 (#6590)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary <!-- Explain the motivation for this PR. Include "Fixes #<number>" if applicable. --> There was a small typo in #6553 which caused building with c++17 to still fail. ## Test plan <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. --> Build works again with RN 0.72 which uses c++17. ## Notes - Fixes #6512 (comment) - Fixes #6584
1 parent 2e1b70e commit 608a909

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636

3737
// Standard `__cplusplus` macro reference:
3838
// https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros
39-
#if REACT_NATIVE_MINOR_VERSION >= 75 || __cplusplus >= 20202L
39+
#if REACT_NATIVE_MINOR_VERSION >= 75 || __cplusplus >= 202002L
4040
// Implicit copy capture of `this` is deprecated in NDK27, which uses C++20.
4141
#define COPY_CAPTURE_WITH_THIS [ =, this ] // NOLINT (whitespace/braces)
4242
#else
4343
// React Native 0.75 is the last one which allows NDK23. NDK23 uses C++17 and
4444
// explicitly disallows C++20 features, including the syntax above. Therefore we
4545
// fallback to the deprecated syntax here.
4646
#define COPY_CAPTURE_WITH_THIS [=] // NOLINT (whitespace/braces)
47-
#endif // REACT_NATIVE_MINOR_VERSION >= 75 || __cplusplus >= 20202L
47+
#endif // REACT_NATIVE_MINOR_VERSION >= 75 || __cplusplus >= 202002L
4848

4949
using namespace facebook;
5050

0 commit comments

Comments
 (0)