From d4f4560902d57aed1fa29644728a675a50ecbba6 Mon Sep 17 00:00:00 2001 From: Alexandru Razvan Caciulescu Date: Fri, 13 Jan 2017 14:38:11 +0200 Subject: [PATCH] Fix 17081 - Bodies in extern cpp functions in D files are not linked --- src/core/stdcpp/typeinfo.d | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/stdcpp/typeinfo.d b/src/core/stdcpp/typeinfo.d index a535dbf802..9d0341b5e6 100644 --- a/src/core/stdcpp/typeinfo.d +++ b/src/core/stdcpp/typeinfo.d @@ -117,8 +117,15 @@ else version (CRuntime_Glibc) { void dtor1(); // consume destructor slot in vtbl[] void dtor2(); // consume destructor slot in vtbl[] - final const(char)* name(); - final bool before(const type_info) const; + final const(char)* name()() const nothrow { + return _name[0] == '*' ? _name + 1 : _name; + } + final bool before()(const type_info _arg) const { + import core.stdc.string : strcmp; + return (_name[0] == '*' && _arg._name[0] == '*') + ? _name < _arg._name + : strcmp(_name, _arg._name) < 0; + } //bool operator==(const type_info) const; bool __is_pointer_p() const; bool __is_function_p() const;