Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code that is written to the 2011 version of the C++ standard, sometimes known by its pre-publication name of "C++0x". Use in conjunction with the 'c++' tag.
11
votes
1
answer
953
views
Random Generation From Sequences
With the inclusion of <random> into C++11, we can finally chuck out std::rand and start using generator with much better properties. Still, it's easy to get things wrong (uniform sampling where 0 occu …
7
votes
2
answers
1k
views
Generic Multiway Merge
Recently I had a problem (not in C++) that required merging a number of sorted lists of values. This is effectively the generalised case of merging together two sorted lists. However, instead of mergi …
8
votes
1
answer
187
views
Typesafe Unit Code Generation
I've previously posted some code that deals with making Cartesian co-ordinates safe at compile time.
I've been doing a bit more thinking about this in a more general setting, as it is a problem that …
15
votes
1
answer
2k
views
Generic Graph Library
I've been working on a generic graph library for a while now, in a bit of an off and on fashion. I realise that boost::graph exists, but it is a complex library that allows the user a huge amount of c …
7
votes
1
answer
523
views
Generic Graph Library Part 2 : Algorithms
(This is a follow on to this question).
Having given an implementation for some of the graph structures, here is a portion of the algorithms that are defined to work over them:
graph_degree.hpp
…
8
votes
2
answers
193
views
Type-safe cartesian co-ordinates
I've recently been fiddling around with a type safe implementation of cartesian co-ordinates (and a few operations on those co-ordinates). Often it's easy to get units mixed up: is something in metres …
11
votes
1
answer
1k
views
Partitioned Multikey Map
Below is the code for what I've called a partitioned_multitype_map. This has two major facets:
Allowing a lookup based on keys of multiple lengths and of multiple types. For example:
typedef parti …