Skip to content

Commit aacf599

Browse files
dgovilpixar-oss
authored andcommitted
An upstream change to Clang will require that size_t be explicitly
brought in from a header, rather than implicitly used, as it allows delineation between different declarations of size_t. This change includes cstddef explicitly in gf. Closes PixarAnimationStudios#3535 (Internal change: 2359159)
1 parent bb283c9 commit aacf599

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pxr/base/gf/half.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@
1818
#include "pxr/base/gf/ilmbase_halfLimits.h"
1919
#include "pxr/base/gf/traits.h"
2020

21+
#include <cstddef>
22+
2123
PXR_NAMESPACE_OPEN_SCOPE
2224

2325
/// A 16-bit floating point data type.
2426
using GfHalf = pxr_half::half;
2527

2628
namespace pxr_half {
2729
/// Overload hash_value for half.
28-
inline size_t hash_value(const half h) { return h.bits(); }
30+
inline std::size_t hash_value(const half h) { return h.bits(); }
2931
// Explicitly delete hashing via implicit conversion of half to float
30-
size_t hash_value(float) = delete;
32+
std::size_t hash_value(float) = delete;
3133
}
3234

3335
template <>

0 commit comments

Comments
 (0)