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

include/buffer: make static_assert c++11-safe #24835

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

liewegas
Copy link
Member

The variant with only one arg was added in c++17.

Signed-off-by: Sage Weil sage@redhat.com

The variant with only one arg was added in c++17.

Signed-off-by: Sage Weil <sage@redhat.com>
@tchaikov
Copy link
Contributor

not sure if test_envlibrados_for_rocksdb.sh is able to verify it. as rocksdb compiles using -std=c++11.

@liewegas
Copy link
Member Author

@rzarzynski
Copy link
Contributor

rzarzynski commented Nov 4, 2018

@liewegas, @tchaikov: apologizes for late review.

I'm afraid we might have a more severe problem as the failure seems to be triggered rather by a GCC version than just -std=c++11. On my machine, with GCC 7.2.0, passing -std=c+11 doesn't fail the compilation on the one-param-taking static_assert till providing -pedantic -Werror as well. And it looks we use a few C++1{4,7} constructs in our public headers (e.g. std::enable_if_t from C++14 in encoding.h and denc.h).

@liewegas
Copy link
Member Author

liewegas commented Nov 4, 2018

Pretty sure neither enocding.h or denc.h appear in librados-devel (or anything else we distribute). The separation between common and include does not mean or imply anything.

@liewegas liewegas merged commit 220ec2b into ceph:master Nov 6, 2018
liewegas added a commit that referenced this pull request Nov 6, 2018
* refs/pull/24835/head:
	include/buffer: make static_assert c++11-safe

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants