Skip to content

Fix C++11 compatibility: use std::is_standard_layout<T>::value#1279

Open
Chris-godz wants to merge 1 commit intogoogle:mainfrom
Chris-godz:main
Open

Fix C++11 compatibility: use std::is_standard_layout<T>::value#1279
Chris-godz wants to merge 1 commit intogoogle:mainfrom
Chris-godz:main

Conversation

@Chris-godz
Copy link
Copy Markdown

Please update static assertions to use the older std::is_standard_layout<T>::value syntax instead of the newer std::is_standard_layout_v<T>.

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

@maflcko
Copy link
Copy Markdown

maflcko commented Apr 9, 2026

Can this be closed after 9e273a6?

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 this pull request may close these issues.

2 participants