Handle "constexpr explicit" and "constexpr static"
This commit is contained in:
parent
87bdaa3910
commit
bfa570e404
3 changed files with 9 additions and 2 deletions
|
|
@ -7,7 +7,8 @@ Version 3.0.4 (in progress)
|
|||
|
||||
2015-01-08: olly
|
||||
Allow C++11 "explicit constexpr". Fixes github issue#284 reported
|
||||
by Paweł Tomulik.
|
||||
by Paweł Tomulik. Also handle "constexpr explicit" and "constexpr
|
||||
static".
|
||||
|
||||
2015-01-08: olly
|
||||
When reporting an error for a construct which hasn't been
|
||||
|
|
|
|||
|
|
@ -18,8 +18,12 @@ struct ConstExpressions {
|
|||
static const int LLL = 300;
|
||||
constexpr int MMM() { return 400; }
|
||||
constexpr const int NNN() { return 500; }
|
||||
// Regression test for https://github.com/swig/swig/issues/284 :
|
||||
// Regression tests for support added in SWIG 3.0.4:
|
||||
static constexpr const int JJJ1 = 101;
|
||||
constexpr static int KKK1 = 201;
|
||||
// Regression tests for https://github.com/swig/swig/issues/284 :
|
||||
explicit constexpr ConstExpressions(int) { }
|
||||
constexpr explicit ConstExpressions(double) { }
|
||||
};
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -4681,7 +4681,9 @@ storage_class : EXTERN { $$ = "extern"; }
|
|||
| EXPLICIT { $$ = "explicit"; }
|
||||
| CONSTEXPR { $$ = "constexpr"; }
|
||||
| EXPLICIT CONSTEXPR { $$ = "explicit constexpr"; }
|
||||
| CONSTEXPR EXPLICIT { $$ = "explicit constexpr"; }
|
||||
| STATIC CONSTEXPR { $$ = "static constexpr"; }
|
||||
| CONSTEXPR STATIC { $$ = "static constexpr"; }
|
||||
| THREAD_LOCAL { $$ = "thread_local"; }
|
||||
| THREAD_LOCAL STATIC { $$ = "static thread_local"; }
|
||||
| STATIC THREAD_LOCAL { $$ = "static thread_local"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue