I am using #pragma once in my .cpps and .hpps and because of that I get a warning for each file that uses it. I have not found any opt
#pragma once
.cpp
.hpp
Indeed the #ifndef guard can always be used, but just to remove the warning while compiling the source which uses #pragma once I would recommend to use the -woption while compiling.
#ifndef
-w
e.g. gcc -w -o
gcc -w -o