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:
William S Fulton 2019-06-07 08:24:25 +01:00
parent 3045ba3532
commit c8cef5c2f2
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ public:
using type2_t = T2;
T1 a;
T2 b;
constexpr int get_n() { return N; }
constexpr int get_n() const { return N; }
};
// Specialization for T1=const char*, T2=bool
@ -26,7 +26,7 @@ public:
using type2_t = bool;
type1_t a;
type2_t b;
constexpr int get_n() { return 3 * N; }
constexpr int get_n() const { return 3 * N; }
};
// alias templates