diff --git a/Source/Checks/cm_cxx14_check.cpp b/Source/Checks/cm_cxx14_check.cpp index 9369ba261a..fff36c9161 100644 --- a/Source/Checks/cm_cxx14_check.cpp +++ b/Source/Checks/cm_cxx14_check.cpp @@ -1,8 +1,15 @@ #include +#include #include int main() { + int a[] = { 0, 1, 2 }; + auto ai = std::cbegin(a); + + int b[] = { 2, 1, 0 }; + auto bi = std::cend(b); + std::unique_ptr u(new int(0)); - return *u; + return *u + *ai + *(bi - 1); } diff --git a/Source/Checks/cm_cxx17_check.cpp b/Source/Checks/cm_cxx17_check.cpp index 4e8918454a..9ea52c4569 100644 --- a/Source/Checks/cm_cxx17_check.cpp +++ b/Source/Checks/cm_cxx17_check.cpp @@ -1,9 +1,18 @@ #include +#include #include #include int main() { + int a[] = { 0, 1, 2 }; + auto ai = std::cbegin(a); + + int b[] = { 2, 1, 0 }; + auto bi = std::cend(b); + + auto ci = std::size(a); + std::unique_ptr u(new int(0)); - return *u; + return *u + *ai + *(bi - 1) + (3 - static_cast(ci)); }