Coder Social home page Coder Social logo

reserved identifier violation about openh264 HOT 8 CLOSED

cisco avatar cisco commented on June 3, 2024
reserved identifier violation

from openh264.

Comments (8)

volvet avatar volvet commented on June 3, 2024

This identifiers is used as define guard for header file include, What's is your suggestion to name those guards for C++ standard fitting? Thanks.

from openh264.

andreasgal avatar andreasgal commented on June 3, 2024

should we use #pragma once instead of include guards?

from openh264.

elfring avatar elfring commented on June 3, 2024

I would like to add another thought for your interest in the construct "#pragma once".
How do you think about to reuse also a name pattern like it is applied in other projects?

from openh264.

cpeterso avatar cpeterso commented on June 3, 2024

You just need to remove leading underscores to avoid pedantic concerns about identifier names reserved by the C or C++ standards.

#pragma once is not standardized and may be confused by symlinks or case insensitive file systems.

from openh264.

andreasgal avatar andreasgal commented on June 3, 2024

We will not have symlinks or case sensitive collisions. Lets be pragmatic and sufficient, not precise and puritan.

from openh264.

ekr avatar ekr commented on June 3, 2024

I'm not overly worried about case collisions, and while we do have
some name duplication, we are working to remove that. With that
said, I would prefer to stick with standard C++ and so use standard
include guards rather than #pragma once.

I agree we should eventually replace these include guards with ones
that don't have leading underscores.

from openh264.

ethanhugg avatar ethanhugg commented on June 3, 2024

I agree with EKR that we should probably just remove the leading underscores.

from openh264.

elfring avatar elfring commented on June 3, 2024

How do you think about to delete an underscore also from an identifier like "_WelsLogicalProcessorInfo"?

from openh264.

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.