Skip to content

Commit

Permalink
Disambiguate templated and non-templated typedefs with the same name.
Browse files Browse the repository at this point in the history
Using-declarations with the same name with and without template is
ambiguous for gcc (tested with 12.3.0, 13.x). Disambiguate them.

PiperOrigin-RevId: 577390198
  • Loading branch information
hzeller authored and copybara-github committed Oct 28, 2023
1 parent 0a8db3d commit 8a9cf47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fuzztest/internal/domains/unique_elements_container_of_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ template <typename T, typename InnerDomain>
class UniqueElementsContainerImpl
: public DomainBase<UniqueElementsContainerImpl<T, InnerDomain>, T,
corpus_type_t<UniqueDomain<InnerDomain>>> {
using UniqueDomainValueT = UniqueDomainValueT<InnerDomain>;
using UniqueDomain = UniqueDomain<InnerDomain>;
using InnerUniqueDomainValueT = UniqueDomainValueT<InnerDomain>;
using InnerUniqueDomain = UniqueDomain<InnerDomain>;

public:
using typename UniqueElementsContainerImpl::DomainBase::corpus_type;
Expand All @@ -66,13 +66,13 @@ class UniqueElementsContainerImpl
}

value_type GetValue(const corpus_type& v) const {
UniqueDomainValueT unique_values = unique_domain_.GetValue(v);
InnerUniqueDomainValueT unique_values = unique_domain_.GetValue(v);
return value_type(unique_values.begin(), unique_values.end());
}

std::optional<corpus_type> FromValue(const value_type& v) const {
return unique_domain_.FromValue(
value_type_t<UniqueDomain>(v.begin(), v.end()));
value_type_t<InnerUniqueDomain>(v.begin(), v.end()));
}

auto GetPrinter() const { return unique_domain_.GetPrinter(); }
Expand Down Expand Up @@ -100,7 +100,7 @@ class UniqueElementsContainerImpl
}

private:
UniqueDomain unique_domain_;
InnerUniqueDomain unique_domain_;
};

} // namespace fuzztest::internal
Expand Down

0 comments on commit 8a9cf47

Please sign in to comment.