Giter Club home page Giter Club logo

Comments (6)

cathugger avatar cathugger commented on July 17, 2024

though this could be moot because gcc already recognizes common ifndef guards: https://gcc.gnu.org/onlinedocs/cpp/Once-Only-Headers.html

from lokinet.

cathugger avatar cathugger commented on July 17, 2024

https://en.wikipedia.org/wiki/Pragma_once wikipedia page on that

from lokinet.

majestrate avatar majestrate commented on July 17, 2024

from lokinet.

despair86 avatar despair86 commented on July 17, 2024

still an unofficial compiler extension on UNIX
hit-or-miss
(yes i've tried this in other projects, get duplicate symbol errors unless i use regular cpp guards)

from lokinet.

cathugger avatar cathugger commented on July 17, 2024

gcc (except old version, but that probably doesn't support modern C++ features this project uses) and clang handle it. so does MSVC.
but yeah not supported officially in any C/C++ standard.

from lokinet.

michael-loki avatar michael-loki commented on July 17, 2024

#pragma once isn't cross platform, several (more niche) compilers don't implement it.

More problematically, it's also not standardised, so there are potential incompatibilities (not that I think lokinet is prone to them).

from lokinet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.