leveldb icon indicating copy to clipboard operation
leveldb copied to clipboard

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

Open bertsky opened this issue 11 months ago • 4 comments

The following build problem was just introduced here:

In file included from leveldb/util/comparator.cc:14:
leveldb/./util/no_destructor.h: In constructor ‘leveldb::NoDestructor<InstanceType>::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<NoDestructor<InstanceType>>);
      |                        ^~~~~~~~~~~~~~~~~~~~
      |                        is_standard_layout
leveldb/./util/no_destructor.h:24:70: error: expected primary-expression before ‘>’ token
   24 |     static_assert(std::is_standard_layout_v<NoDestructor<InstanceType>>);
      |                                                                      ^~
leveldb/./util/no_destructor.h:24:72: error: expected primary-expression before ‘)’ token
   24 |     static_assert(std::is_standard_layout_v<NoDestructor<InstanceType>>);
      |                                                                        ^
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.

bertsky avatar Jan 27 '25 14:01 bertsky

seems to have been introduced by this commit

Simonhancrew avatar Feb 03 '25 12:02 Simonhancrew

I also found it.

Kosthi avatar Feb 13 '25 09:02 Kosthi

Failed in first step. cmake and make, then errors.

dingqunfei avatar Mar 03 '25 06:03 dingqunfei

Confirming that this error is still happening.

hq6 avatar Jun 12 '25 23:06 hq6