Comments (8)
sprintf_s
is not a standard function. std::snprintf
is only available in C++11 and for example VC12 doesn't support it.
from bond.
I think even snprintf
is banned by SDL. Could we conditionally upgrade to using sprintf_s
if MSVC is detected? (Since it's writing into a stack-allocated buffer the code would just need to switch function calls without further changes - sprintf_s
is templated for this case.)
from bond.
Potential fix: https://github.com/Porges/bond/commit/9c29ed6c7c2b041231d0cab33341903f4b457630
from bond.
I don't want to add conditional code with proprietary extensions. A better solution is to get rid of sprintf altogether. It is an overkill anyways since we only depend on it to convert integers to string.
from bond.
"Get rid of sprintf altogether" is always the better choice for simple conversions. For complex conversions, thatโs what std::ostringstream is for.
from bond.
Would it be sane to just replace the custom basic_string_stream
class with the std one? Then this could be avoided entirely - assuming there's not a strong reason to keep it. Does it exist for performance concerns/compatibility?
from bond.
Performance.
from bond.
OK. I guess I can just switch on _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
anyway โบ
from bond.
Related Issues (20)
- [C#] Support System.Collections.Immutable collections as custom containers
- [C++] How do we deserialize two continuous objects from one bulk of memory? HOT 2
- In C# implementation, how to parse to structs separated by BT_STOP_BASE HOT 2
- Correct way to read list of mapped values in C# HOT 3
- [ci] Image cleanup script needs to handle 18.04 images
- [ci] CI image Dockerfile needs to be paramatarized on FROM registry
- This repo is missing important files
- c#: Add ToString() implementations for compiled bond objects HOT 1
- Merge API support for C#? HOT 2
- Bond generated headers don't work for clang in c++20 HOT 2
- Include enums in Bond runtime schema HOT 1
- cmake/Config.cmake looks for the EOLed Python-2.7 HOT 1
- Deserialization/serialization under Linux is 7x-10x slower than Windows HOT 2
- [C#] gbc.exe: Exec format error inside mcr.microsoft.com/dotnet/sdk:latest docker image. HOT 3
- "openFile: does not exist (No such file or directory)" on Linux HOT 3
- [C#] Deserializing bond-like strings into dynamic type HOT 2
- Linux build error - ghc: panic! HOT 4
- Support dotnet trimming HOT 5
- Target `netstandard2.0` for c# HOT 1
- C++: GCC: Double/Float comparison warning HOT 2
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 bond.