``++#pragma once++`` is a preprocessor directive meant to ensure that a file is only included once in a compilation unit. However, there are several reasons to avoid it:

* While it is widely implemented, it's not universally supported.
* It's not part of the standard, so its behavior may vary from compiler to compiler.
* If the same file exists in two different locations, it will _not_ prevent the second file from being included in the compilation.

For these reasons, include guards, or include guards along with ``++#pragma once++`` should be used instead.


== Noncompliant Code Example

----
// my_header.h
#pragma once
...
----


== Compliant Solution

----
// my_header.h
#ifndef MY_HEADER
#define MY_HEADER
...
#endif
----
or

----
// my_header.h
#pragma once
#ifndef MY_HEADER
#define MY_HEADER
...
#endif
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
