[all-commits] [llvm/llvm-project] 7d9a16: [ADT] Allow IsSizeLessThanThresholdT for incomplet...
Yevgeny Rouban via All-commits
all-commits at lists.llvm.org
Thu Aug 20 21:03:30 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7d9a16241fdd800a394e5cb4ecdf76f6bb8c9d9f
https://github.com/llvm/llvm-project/commit/7d9a16241fdd800a394e5cb4ecdf76f6bb8c9d9f
Author: Yevgeny Rouban <yrouban at azul.com>
Date: 2020-08-21 (Fri, 21 Aug 2020)
Changed paths:
M llvm/include/llvm/ADT/FunctionExtras.h
Log Message:
-----------
[ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC
If the type T is incomplete then sizeof(T) results in C++ compilation error at line:
static constexpr bool value = sizeof(T) <= (2 * sizeof(void *));
This patch allows incomplete types in parameters of function. Example:
using SomeFunc = void(SomeIncompleteType &);
llvm::unique_function<SomeFuncType> SomeFunc;
Reviewers: DaniilSuchkov, vvereschaka
Differential Revision: https://reviews.llvm.org/D81554
More information about the All-commits
mailing list