mirror of https://github.com/swig/swig
Fix constexpr-not-const clang warning in testcase
'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
This commit is contained in:
parent
3045ba3532
commit
c8cef5c2f2
|
@ -15,7 +15,7 @@ public:
|
||||||
using type2_t = T2;
|
using type2_t = T2;
|
||||||
T1 a;
|
T1 a;
|
||||||
T2 b;
|
T2 b;
|
||||||
constexpr int get_n() { return N; }
|
constexpr int get_n() const { return N; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Specialization for T1=const char*, T2=bool
|
// Specialization for T1=const char*, T2=bool
|
||||||
|
@ -26,7 +26,7 @@ public:
|
||||||
using type2_t = bool;
|
using type2_t = bool;
|
||||||
type1_t a;
|
type1_t a;
|
||||||
type2_t b;
|
type2_t b;
|
||||||
constexpr int get_n() { return 3 * N; }
|
constexpr int get_n() const { return 3 * N; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// alias templates
|
// alias templates
|
||||||
|
|
Loading…
Reference in New Issue