[PATCH] D58969: Expose template parameters of endian specific types as class members

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 06:09:13 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL355504: Expose template parameters of endian specific types as class members (authored by labath, committed by ).

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58969/new/

https://reviews.llvm.org/D58969

Files:
  llvm/trunk/include/llvm/Support/Endian.h


Index: llvm/trunk/include/llvm/Support/Endian.h
===================================================================
--- llvm/trunk/include/llvm/Support/Endian.h
+++ llvm/trunk/include/llvm/Support/Endian.h
@@ -203,10 +203,14 @@
 
 namespace detail {
 
-template<typename value_type,
-         endianness endian,
-         std::size_t alignment>
+template<typename ValueType,
+         endianness Endian,
+         std::size_t Alignment>
 struct packed_endian_specific_integral {
+  using value_type = ValueType;
+  static constexpr endianness endian = Endian;
+  static constexpr std::size_t alignment = Alignment;
+
   packed_endian_specific_integral() = default;
 
   explicit packed_endian_specific_integral(value_type val) { *this = val; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58969.189493.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/5bf91950/attachment.bin>


More information about the llvm-commits mailing list