make goto based exceptions available for 'nim cpp' (#13244)
* make goto based exceptions available for 'nim cpp' * optimize seq.add to be comparable to C++'s emplace_back
This commit is contained in:
parent
4f3dd33509
commit
6efac70181
11 changed files with 29 additions and 18 deletions
|
|
@ -342,7 +342,7 @@ type
|
|||
|
||||
proc genObjectInit(p: BProc, section: TCProcSection, t: PType, a: var TLoc,
|
||||
mode: ObjConstrMode) =
|
||||
if p.module.compileToCpp and t.isException and not isDefined(p.config, "noCppExceptions"):
|
||||
if p.module.compileToCpp and t.isException and p.config.exc == excCpp:
|
||||
# init vtable in Exception object for polymorphic exceptions
|
||||
includeHeader(p.module, "<new>")
|
||||
linefmt(p, section, "new ($1) $2;$n", [rdLoc(a), getTypeDesc(p.module, t)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue