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
|
|
@ -608,7 +608,7 @@ proc getRecordDesc(m: BModule, typ: PType, name: Rope,
|
|||
elif m.compileToCpp:
|
||||
appcg(m, result, " : public $1 {$n",
|
||||
[getTypeDescAux(m, typ[0].skipTypes(skipPtrs), check)])
|
||||
if typ.isException:
|
||||
if typ.isException and m.config.exc == excCpp:
|
||||
appcg(m, result, "virtual void raise() { throw *this; }$n", []) # required for polymorphic exceptions
|
||||
if typ.sym.magic == mException:
|
||||
# Add cleanup destructor to Exception base class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue