================ @@ -89,12 +89,18 @@ class DynamicRegisterInfo { GetRegisterInfo(llvm::StringRef reg_name) const; typedef std::vector<lldb_private::RegisterInfo> reg_collection; - llvm::iterator_range<reg_collection::const_iterator> registers() const { - return llvm::iterator_range<reg_collection::const_iterator>(m_regs); + + template <typename T> T registers(); ---------------- bulbazord wrote:
Maybe explicitly delete the default non-specialized implementation? That would move an incorrect usage from a linker error to a compiler error (which is a little easier to reason about for most folks) https://github.com/llvm/llvm-project/pull/71402 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits