diff options
author | David Mason <davmason@microsoft.com> | 2018-03-22 11:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 11:44:37 -0700 |
commit | d67a99436216ce7379d3c42dc8940d7c02eb3c0f (patch) | |
tree | 2094fa8e7a8fd99649304b78daaffaac1526d9c5 /src/gc | |
parent | 8f4a5e5acfd3f64b36a5a0e55fcb88c84b7a1528 (diff) | |
download | coreclr-d67a99436216ce7379d3c42dc8940d7c02eb3c0f.tar.gz coreclr-d67a99436216ce7379d3c42dc8940d7c02eb3c0f.tar.bz2 coreclr-d67a99436216ce7379d3c42dc8940d7c02eb3c0f.zip |
fix order of Serialize for linux build (#17119)
Fix for #17116. The build would work fine for dynamic events on Windows, but on Linux clang always takes the overloads with <Head, Tail...> until there are no arguments, then complains about no overload takes 0 arguments.
Diffstat (limited to 'src/gc')
-rw-r--r-- | src/gc/gcevent_serializers.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gc/gcevent_serializers.h b/src/gc/gcevent_serializers.h index 643ab82a15..ac6e9915ff 100644 --- a/src/gc/gcevent_serializers.h +++ b/src/gc/gcevent_serializers.h @@ -106,33 +106,33 @@ struct EventSerializationTraits<uint32_t> * Given a list of arguments , returns the total size of * the buffer required to fully serialize the list of arguments. */ -template<class Head, class... Tail> -size_t SerializedSize(Head head, Tail... tail) -{ - return EventSerializationTraits<Head>::SerializedSize(head) + SerializedSize(tail...); -} - template<class Head> size_t SerializedSize(Head head) { return EventSerializationTraits<Head>::SerializedSize(head); } +template<class Head, class... Tail> +size_t SerializedSize(Head head, Tail... tail) +{ + return EventSerializationTraits<Head>::SerializedSize(head) + SerializedSize(tail...); +} + /* * Given a list of arguments and a list of actual parameters, serialize * the arguments into the buffer that's given to us. */ -template<class Head, class... Tail> -void Serialize(uint8_t** buf, Head head, Tail... tail) +template<class Head> +void Serialize(uint8_t** buf, Head head) { EventSerializationTraits<Head>::Serialize(head, buf); - Serialize(buf, tail...); } -template<class Head> -void Serialize(uint8_t** buf, Head head) +template<class Head, class... Tail> +void Serialize(uint8_t** buf, Head head, Tail... tail) { EventSerializationTraits<Head>::Serialize(head, buf); + Serialize(buf, tail...); } } // namespace gc_event |