google / google/leveldb

regression: does not compile because of C++17 construct

Open
#1,247 4 comments 7 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

The following build problem was just introduced [here](https://github.com/google/leveldb/commit/302786e211d1f2e6fd260261f642d03a91e5922c):

```
In file included from leveldb/util/comparator.cc:14:
leveldb/./util/no_destructor.h: In constructor ‘leveldb::NoDestructor::NoDestructor(ConstructorArgTypes&& ...)’:
leveldb/./util/no_destructor.h:24:24: error: ‘is_standard_layout_v’ is not a member of ‘std’; did you mean ‘is_standard_layout’?
24 | static_assert(std::is_standard_layout_v>);
| ^~~~~~~~~~~~~~~~~~~~
| is_standard_layout
leveldb/./util/no_destructor.h:24:70: error: expected primary-expression before ‘>’ token
24 | static_assert(std::is_standard_layout_v>);
| ^~
leveldb/./util/no_destructor.h:24:72: error: expected primary-expression before ‘)’ token
24 | static_assert(std::is_standard_layout_v>);
| ^
make[2]: *** [CMakeFiles/leveldb.dir/build.make:468: CMakeFiles/leveldb.dir/util/comparator.cc.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:183: CMakeFiles/leveldb.dir/all] Fehler 2
```

#1246 fixes this by requiring C++17 instead of C++11. But you may want to review adding the dependency via `is_standard_layout_v` in the first place.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.