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

No public description #1403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions fuzztest/internal/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ constexpr std::optional<int> ApplyIndexFor(F f) {
template <typename T>
constexpr std::optional<int> DetectBraceInitCount() {
constexpr auto can_init_impl =
[](auto... I) -> decltype(T{(I, AnythingBut<T>{})...}) {};
[](auto... I) -> decltype(T{{(I, AnythingBut<T>{})}...}) {};
constexpr auto can_init = [](auto... I) {
return std::is_invocable_v<decltype(can_init_impl), decltype(I)...>;
};
Expand Down Expand Up @@ -704,7 +704,7 @@ constexpr std::optional<int> DetectBindableFieldCount() {

// Detect if the first initialization field is a base class.
constexpr auto no_base_impl = [](auto... I)
-> decltype(T{AnythingButBaseOf<T>{}, (I, AnythingBut<T>{})...}) {};
-> decltype(T{AnythingButBaseOf<T>{}, {(I, AnythingBut<T>{})}...}) {};
constexpr auto no_base = [](auto... I) {
return std::is_invocable_v<decltype(no_base_impl), decltype(I)...>;
};
Expand All @@ -717,8 +717,9 @@ constexpr std::optional<int> DetectBindableFieldCount() {

// Detect if the second initialization field is a base class.
constexpr auto no_two_bases_impl =
[](auto... I) -> decltype(T{AnythingBut<T>{}, AnythingButBaseOf<T>{},
(I, AnythingBut<T>{})...}) {};
[](auto... I) -> decltype(T{AnythingBut<T>{},
AnythingButBaseOf<T>{},
{(I, AnythingBut<T>{})}...}) {};
constexpr auto no_two_bases = [](auto... I) {
return std::is_invocable_v<decltype(no_two_bases_impl), decltype(I)...>;
};
Expand Down
2 changes: 1 addition & 1 deletion fuzztest/internal/type_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ struct UnknownPrinter {

template <typename T>
decltype(auto) AutodetectTypePrinter() {
if constexpr (std::numeric_limits<T>::is_integer || std::is_enum_v<T>) {
if constexpr (std::is_integral_v<T> || std::is_enum_v<T>) {
return IntegralPrinter{};
} else if constexpr (std::is_floating_point_v<T>) {
return FloatingPrinter{};
Expand Down
Loading