
This has been done using the following command find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)size_t)|\1std::\2|' \{} \; And manually removed some false positives in std/depr/depr.c.headers. The `std` module doesn't export `::size_t`, this is a preparation for that module. Reviewed By: ldionne, #libc, EricWF, philnik Differential Revision: https://reviews.llvm.org/D146088
26 lines
610 B
C++
26 lines
610 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <functional>
|
|
|
|
// Hashing a struct w/o a defined hash should fail.
|
|
|
|
#include <functional>
|
|
#include <cassert>
|
|
#include <type_traits>
|
|
|
|
struct X {};
|
|
|
|
int main(int, char**)
|
|
{
|
|
X x;
|
|
std::size_t h = std::hash<X>{} ( x );
|
|
|
|
return 0;
|
|
}
|