Coder Social home page Coder Social logo

缺少 `signed char` about safe-rules HOT 5 CLOSED

qihoo360 avatar qihoo360 commented on July 17, 2024
缺少 `signed char`

from safe-rules.

Comments (5)

brotherbeer avatar brotherbeer commented on July 17, 2024

收到~ ISO/IEC 14882: 2011 3.10(10) 的原文只提到了 char 和 unsigned char,这是标准的疏漏还是另有深意,我们再研究研究,先按原文翻译吧,谢谢~

3 10(10)

from safe-rules.

lhmouse avatar lhmouse commented on July 17, 2024

ISO C 允许 signed char,但是 ISO C++ 未有此条目。

from safe-rules.

Timothy-Liuxf avatar Timothy-Liuxf commented on July 17, 2024

抱歉,这确实是我的疏漏

关于不含 signed char 的问题,StackOverflow 上的高赞回答貌似有对其的解释:
https://stackoverflow.com/questions/21176193/why-c-and-c-hate-signed-char-so-much

高赞回答的评论里提到的反例 EBCDIC 编码有参考:

from safe-rules.

brotherbeer avatar brotherbeer commented on July 17, 2024

真是一个有趣的问题~

from safe-rules.

brotherbeer avatar brotherbeer commented on July 17, 2024

本文在 ID_plainBinaryChar 中提到了用有符号 char 类型访问二进制数据的弊端,限于篇幅,更深的历史问题和兼容性问题就留给读者继续探索吧~

from safe-rules.

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.