Comments (3)
How "standards compliant/cross compiler compatible" does this issue want to go? My understanding that the best way to work across multiple compilers is to not only include the <cstdint>
header but also access these types through the std
namespace. Code such as the following doesn't do either, but it is technically using the C++ standard typedefs.
https://github.com/Microsoft/calculator/blob/6a1c2e4bbfd81a9018c8b3e39d2d4afef5caf9f2/src/CalcManager/Header%20Files/Number.h#L14
from calculator.
This is your friendly Microsoft Issue Bot. I created this issue automatically as requested by a team member.
from calculator.
What the standard has to say about this...
C++11 (taken from the n3242 draft):
Except as noted in Clauses 18 through 30 and Annex D, the contents of each header cname shall be the same as that of the corresponding header name.h, as specified in the C standard library (1.2) or the C Unicode TR, as appropriate, as if by inclusion. In the C++ standard library, however, the declarations (except for names which are defined as macros in C) are within namespace scope (3.3.6) of the namespace std. It is unspecified whether these names are first declared within the global namespace scope and are then injected into namespace std by explicit using-declarations (7.3.3).
The C++17 version is pretty much the same, but with updated section, clause and annex numbers/identifiers.
The most important point to take away from this is that "the declarations ... are within namespace scope of the namespace std.".
The standard only specifies that the names must be in the namespace std
,
it does not explicitly specify that they should also be in the global namespace.
Furthermore, the "Header synopsis" ([cstdint.syn]
) provided by the standard also only specifies the types in the std
namespace.
(The only difference between the C++11 and C++17 listing is that C++11 uses typedef
and C++17 uses using
.)
from calculator.
Related Issues (20)
- How to remove fucking spaces from this calculator or return to windows 7 verison. HOT 2
- space
- Wrong result in the win 11 calculator HOT 2
- Calculator Does Not Support Multiplying By Negative Numbers
- Using '%' in Standard Calculator Clears Input HOT 1
- Multiple Currency Conversion
- Calculator crashes if you zoom to far out on the Graphing Page
- Ja
- Ja
- [Localization]
- SWIPE DELETE FUNCTION FREEZES APP
- Wrong icon of calculator
- Disable scientific notation
- Programmer calculator treats MSB as sign bit, no option to remove sign bit
- Can you set a button for the top function in all (scientific) modes
- Is it possible to add an option that allows you to restore the history even after closing the application and opening it again? HOT 1
- "about equal to" feature in the volume calculator/converter
- Constant ratio of units on the axes
- [Localization] [zh-CN] Incorrect translations in Currency
- Disabling the Clipboard User Service causes Calculator to crash when copying values or pressing CTRL+C
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calculator.