Comments (6)
Hi, since this library is not focusing on performance but handiness, I believe either is OK.
But yeah, std::unordered_map seems natural for this case.
from tinytoml.
Since I rely upon writing toml tables as well as parsing them, I would rather have them outputted in insertion order than random order.
from tinytoml.
@veeg yeah, it is also reasonable. However, to keep insertion order, we need to introduce something like LinkedHashMap
in Java, however it's not available in STL. Another option is to use std::vector<std::pair<std::string, Value>>>
for Table, but it won't be what we want to use.
from tinytoml.
Anyway, insertion order cannot be kept without introducing a bit fancy data structure.
from tinytoml.
Ahh, I'm quite forgetfull. I played around with insertion order on my local fork instead. I must have mixed up my experiences and memories regarding the matter.
from tinytoml.
To reduce the impact, a solution could be to limit the use of std::unordered_map to the parser? This way, the writer (that we are not using), would be unaffected. I understand it may be harder to implement though, as some code/definitions couldn't any more be shared between the two components of the library.
from tinytoml.
Related Issues (20)
- toml::parse() fails if UTF-8 BOM is present. HOT 1
- Support for ints in hex/binary format? HOT 4
- gmtime_r fails with MinGW GCC version 4.8.0 HOT 5
- Use sscanf_s for msvc? HOT 1
- Signed integer overflow on libstdc++ HOT 4
- Check state of input stream before parsing HOT 1
- support compilation with exception disabled HOT 3
- Suggestion: rename include/toml to include/tinytoml HOT 2
- TOML 5.0 HOT 1
- Suggestion: Add VERSION MACRO.
- Cut a tagged release HOT 1
- FYI: Made a Conan recipe for tinytoml HOT 1
- Can't compile with nvcc 9.0.176 or 10.0.130 HOT 1
- Make "typeToString()" public? HOT 2
- Macro for adding custom types to Value::as<T>()
- Do you have plans to support toml 0.5.0 or 1.00?
- Type type() const { return type_; } Seg fault on Beagle Bone black, ARM target HOT 1
- stack-overflow at "parseFile" HOT 1
- ABRT on __cxxabiv1
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 tinytoml.