C++11 alternate syntax for function declarations improvements
Functions can now be declared const/noexcept/final etc
This commit is contained in:
parent
2a5068bcf2
commit
0ccef1424a
3 changed files with 38 additions and 27 deletions
|
|
@ -4,11 +4,20 @@ a = cpp11_alternate_function_syntax.SomeStruct()
|
|||
|
||||
res = a.addNormal(4, 5)
|
||||
if res != 9:
|
||||
raise RuntimeError, ("SomeStruct::addNormal(4,5) returns ",
|
||||
res, " should be 9.")
|
||||
|
||||
raise RuntimeError, ("SomeStruct::addNormal(4,5) returns ", res, " should be 9.")
|
||||
|
||||
res = a.addAlternate(4, 5)
|
||||
if res != 9:
|
||||
raise RuntimeError, ("SomeStruct::addAlternate(4,5) returns ",
|
||||
res, " should be 9.")
|
||||
raise RuntimeError, ("SomeStruct::addAlternate(4,5) returns ", res, " should be 9.")
|
||||
|
||||
res = a.addAlternateConst(4, 5)
|
||||
if res != 9:
|
||||
raise RuntimeError, ("SomeStruct::addAlternateConst(4,5) returns ", res, " should be 9.")
|
||||
|
||||
res = a.addAlternateNoExcept(4, 5)
|
||||
if res != 9:
|
||||
raise RuntimeError, ("SomeStruct::addAlternateNoExcept(4,5) returns ", res, " should be 9.")
|
||||
|
||||
res = a.addAlternateConstNoExcept(4, 5)
|
||||
if res != 9:
|
||||
raise RuntimeError, ("SomeStruct::addAlternateConstNoExcept(4,5) returns ", res, " should be 9.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue