cmAlgorithms: Fix -Wnon-c-typedef-for-linkage warnings
In commit bf1e73305a
(cmAlgorithms: Refactor cmRemoveDuplicates,
2019-03-03, v3.15.0-rc1~414^2) we added `union X = struct {}`.
C++ had a rule change whereby only C-compatible unnamed typedefs are
allowed. Clang 11 warns about this by default. See
https://reviews.llvm.org/D74103. The aliases don't seem to be
necessary, so simply define as structs.
This commit is contained in:
parent
d1cb554c99
commit
a54d96b722
@ -139,7 +139,7 @@ template <typename ForwardIterator>
|
||||
ForwardIterator cmRemoveDuplicates(ForwardIterator first, ForwardIterator last)
|
||||
{
|
||||
using Value = typename std::iterator_traits<ForwardIterator>::value_type;
|
||||
using Hash = struct
|
||||
struct Hash
|
||||
{
|
||||
std::size_t operator()(ForwardIterator it) const
|
||||
{
|
||||
@ -147,7 +147,7 @@ ForwardIterator cmRemoveDuplicates(ForwardIterator first, ForwardIterator last)
|
||||
}
|
||||
};
|
||||
|
||||
using Equal = struct
|
||||
struct Equal
|
||||
{
|
||||
bool operator()(ForwardIterator it1, ForwardIterator it2) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user