Skip to content
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

[Bug]: Compilation fails with Clang15 #4148

Closed
abhinandanudupa opened this issue Feb 10, 2023 · 0 comments
Closed

[Bug]: Compilation fails with Clang15 #4148

abhinandanudupa opened this issue Feb 10, 2023 · 0 comments
Assignees

Comments

@abhinandanudupa
Copy link

abhinandanudupa commented Feb 10, 2023

Describe the issue

Using the clang 15 compiler gives the error:

...gtest-src/googletest/include\gtest/internal/gtest-internal.h(918,54): error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
constexpr bool HasDebugStringAndShortDebugString<T>::value;
                                                     ^
1 error generated.

Redundant declarations have been deprecated in C++17.

Steps to reproduce the problem

Please refer to this issue: WasmEdge/WasmEdge#2224
Relevant CMake config:

What version of GoogleTest are you using?

Version: 1.11 (we get the same issue with 1.13 also)

What operating system and version are you using?

Windows 11

What compiler and version are you using?

clang 15.0.7

What build system are you using?

cmake version 3.25.1

Additional context

I have not tried setting set(CMAKE_CXX_STANDARD 14) as a temporary fix. Looks like setting this resolves the issue for now.

abhinandanudupa added a commit to abhinandanudupa/googletest that referenced this issue Feb 10, 2023
Improves Compatibility with C++17.

Resolves: google#4148
abhinandanudupa added a commit to abhinandanudupa/googletest that referenced this issue Feb 10, 2023
Improves Compatibility with C++17.

Resolves: google#4148
Signed-off-by: Abhinandan Udupa <67597710+abhinandanudupa@users.noreply.github.com>
abhinandanudupa added a commit to abhinandanudupa/googletest that referenced this issue Feb 10, 2023
Improve compatibility with C++17.

Resolves: google#4148
Signed-off-by: Abhinandan Udupa <67597710+abhinandanudupa@users.noreply.github.com>
gaspardpetit pushed a commit to eidosmontreal/googletest that referenced this issue Feb 24, 2023
Keep declarations in c++ < 17 using new macro, GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL.

Fixes google#4148.

PiperOrigin-RevId: 511510401
Change-Id: I76c3f2fccf07a0978adcbe5f8f0203b9d0c33872
kunitoki pushed a commit to kunitoki/googletest that referenced this issue Nov 4, 2023
Keep declarations in c++ < 17 using new macro, GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL.

Fixes google#4148.

PiperOrigin-RevId: 511510401
Change-Id: I76c3f2fccf07a0978adcbe5f8f0203b9d0c33872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants