Fix c++ compiler warnings in c++11 testcases
This commit is contained in:
parent
57a89f987d
commit
be63f73e33
6 changed files with 31 additions and 10 deletions
|
|
@ -3,11 +3,17 @@
|
|||
*/
|
||||
%module cpp11_constexpr
|
||||
|
||||
|
||||
%inline %{
|
||||
#ifdef SWIG
|
||||
#define CONST const
|
||||
#else
|
||||
#define CONST
|
||||
#endif
|
||||
constexpr int AAA = 10;
|
||||
constexpr const int BBB = 20;
|
||||
constexpr int CCC() { return 30; }
|
||||
constexpr const int DDD() { return 40; }
|
||||
constexpr CONST int DDD() { return 40; }
|
||||
|
||||
constexpr int XXX() { return 10; }
|
||||
constexpr int YYY = XXX() + 100;
|
||||
|
|
@ -17,7 +23,7 @@ struct ConstExpressions {
|
|||
static constexpr int KKK = 200;
|
||||
static const int LLL = 300;
|
||||
constexpr int MMM() { return 400; }
|
||||
constexpr const int NNN() { return 500; }
|
||||
constexpr CONST int NNN() { return 500; }
|
||||
// Regression tests for support added in SWIG 3.0.4:
|
||||
static constexpr const int JJJ1 = 101;
|
||||
constexpr static int KKK1 = 201;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue