my C++ code has calls to classes such as std::ifstream to open a file for reading or std::filesystem methods that iterate over directories or check if a file exists - I intend to abstract these away in wrappers as I'm about to support working both on cloud and on a local filesystem.
I want to prevent someone from adding calls to such methods (i.e. have a compiler warning or a clang-tidy rule that will fail) and only allow accessing the file system using my wrappers.
Is it possible?I read about #pragma GCC poison but this means I have to list all of the possible methods that I want to ban
I'm still in the assessment stage