Question
Is there any tools for detecting files and lines that is using c++17 features?
Background
I'm developing some software with c++17.
Recentlty a customer requested us to list files and lines that is using c++17 features.
The reason is that they have to applicate deviation permits for using c++17 feature because their internal coding conventions is standarized by c++14.
It may be possible to detect them using a compiler, but the compiler stops every time it detects an error, making it time-consuming to detect all errors.
For ease to list up, I asked above question!
What we tried
I tried to use cpplint/clang-format.
But these tools didn't detect c++17 feature despite c++14 option. The code I tested is below.
#include <iostream>
// C++17 feature
namespace aaa::bbb::ccc
{
void f()
{ std::cout << "a new nested namespace definition is worked!\n"; }
}
namespace aaa
{
namespace bbb
{
namespace ccc
{
void g()
{ std::cout << "a legacy nested namespace definition is workded.\n"; }
}
}
}
int main()
{
aaa::bbb::ccc::f();
aaa::bbb::ccc::g();
}
Thank you!