hotspot/src/share/vm/gc/g1/ptrQueue.hpp
changeset 34148 6efbc7ffd767
parent 33761 329db4b51480
child 36354 28bbe66a0498
--- a/hotspot/src/share/vm/gc/g1/ptrQueue.hpp	Tue Nov 17 12:37:55 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/ptrQueue.hpp	Tue Nov 17 16:40:52 2015 -0500
@@ -140,19 +140,27 @@
   }
 
   // To support compiler.
+
+protected:
+  template<typename Derived>
   static ByteSize byte_offset_of_index() {
-    return byte_offset_of(PtrQueue, _index);
+    return byte_offset_of(Derived, _index);
   }
+
   static ByteSize byte_width_of_index() { return in_ByteSize(sizeof(size_t)); }
 
+  template<typename Derived>
   static ByteSize byte_offset_of_buf() {
-    return byte_offset_of(PtrQueue, _buf);
+    return byte_offset_of(Derived, _buf);
   }
+
   static ByteSize byte_width_of_buf() { return in_ByteSize(sizeof(void*)); }
 
+  template<typename Derived>
   static ByteSize byte_offset_of_active() {
-    return byte_offset_of(PtrQueue, _active);
+    return byte_offset_of(Derived, _active);
   }
+
   static ByteSize byte_width_of_active() { return in_ByteSize(sizeof(bool)); }
 
 };