Comments (7)
Perhaps at some point in it's evolution it was written to disk, or at least was going to be. It'd be use std::map/std::unordered_map/etc. That raises my next question: should we rely purely on std::map or on std::unordered_map, should we use an external hash map library like Google SparseHash, or perhaps we should use std::unordered_map when detected by configure but use something like SparseHash when it's not available?
from tsc.
std::unordered_map
is an interesting option — I’ve not yet looked detailed on C++11, but it seems very good for this purpose. Regarding SparseHash, I think we should rely on the standard library as much as viable, because that minimizes our external dependency list, which is already quite large. As C++11 is not that new anymore (3 years!) I guess that with the next Ubuntu LTS release most current mayor Linux distributions should have a C++11-capable compiler. It should be no problem to rely on its features.
Vale,
Quintus
from tsc.
If we want to support earlier versions of gcc we can use std::tr1::unordered_map
, which was defined in C++ Technical Report 1 (2005-2007). It's just a draft but a number of vendors opted to support it early.
It shouldn't be hard to add a little configure
check to see whether std::unordered_map
or std::tr1::unordered_map
is available and fall back to std::map
in the worst case scenario.
The only platform I'd worry about being way behind in terms of GCC would be RHEL/CentOS. I've had so many problems with those platforms because of old GCCs.
from tsc.
It shouldn't be hard to add a little configure check
Yes, that should be relatively easy. I think we should go that route.
The only platform I'd worry about being way behind in terms of GCC would be RHEL/CentOS
Ahem. I highly doubt RHEL/CentOS maintainers want to immediately ship SMC 2.0.0. When they decide to do so in five or ten years, they will most likely also ship a newer GCC that supports C++11. I’m not willing to make workarounds in SMC’s code for these distributions, which are usually not meant to be used as game computers anyway, but targetted at either server or office use.
Vale,
Quintus
from tsc.
Btw. when we decide to go C++11, we can probably replace boost::thread
with the C++11 thread library. Just a thought...
from tsc.
Gotta love dependency squashing. ;)
from tsc.
Just for the record, on the MinGW ML they’re currently discussing cross-platform thread alternatives in C and C++. The C++11 std::thread
has been mentioned as being the best option so far: http://sourceforge.net/p/mingw/mailman/message/32214718/
Vale,
Quintus
from tsc.
Related Issues (20)
- Game Crashes Sometimes on Game Save HOT 2
- Menus do not display anything HOT 25
- Directional Pad Inverted for XBox 360 Controller in Windows, 64 Bit TSC HOT 4
- Replace tinyclipboard with SFML
- Macintosh version of TSC HOT 66
- Portable version [feature request] HOT 7
- linker can't find -liconv or -lintl on FreeBSD HOT 6
- mruby build fails HOT 6
- Compiler error: conflicting types for ‘reserved_word’ HOT 6
- Missing releases HOT 3
- publishing pkgbuild HOT 20
- debian 11 deb, missing dependency HOT 5
- makedeb and mpr HOT 2
- get-deb HOT 2
- a linux statically linked version HOT 7
- When the player character loses a life, the score resets to 0 ?
- TSC AppImage package for amd64/arm64/s390x HOT 9
- cegui dependency not available for building Windows version HOT 13
- Unable to build on Ubuntu 24.04 HOT 6
- Compiling fails with boost-1.85 (Linux / Gentoo)
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 tsc.