Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
123 views

Could this deferred execution scheme be any simpler?

I've created this scheme to preserve function calls until all the arguments are available. The stub_op classes will be replaced with classes that implement a forward-like mechanism that receives ...
3
votes
0answers
66 views

Type to instance map

I needed a class where I could store an instance of any type. The goal was an interface as follows: class TypeMap { template<typename T> T& get(); }; Such that: Iff &m1 == ...
0
votes
1answer
260 views

Review of C++ singleton

Originally posted on Stack Overflow. So far, I've used this in a few places and it seems solid. This is what I usually do to make a singleton: // Assume x86 for now #ifdef _MSC_VER #include ...
2
votes
0answers
742 views

JSON Serializer

Carrying on from: Yet another C++ Json Parser Yet another C++ Json Parser (Recursive) All the code is available from git hub: ThorsSerializer but only reviewing a small section here. The idea is ...
1
vote
1answer
107 views

How can I improve the design of this serialization mechanism?

I'm working on caching library which is intended to work with all types of values. Values are represented as instances of value_type: value_type holds a std::vector<char> for the raw data, and ...
1
vote
0answers
115 views

Variadic function with restricted types

I am designing a class which (among other things) acts as a vertex in an undirected graph. #include <iterator> #include <string> class Node { public: explicit Node(const ...
9
votes
1answer
280 views

D2.0 mixin and template-heavy code - Building a silverlight clone

I've made a mock version of silverlight in D2. It is meant to output html but since I don't know html yet, it's current output is not valid. Html is not the reason I'm here though. The goal of my ...
3
votes
1answer
309 views

Meta-program to find square numbers

I'm new to template meta-programming and wrote some code to determine if a number is a perfect square. For example, in my program, SQUARE<1>::value and SQUARE<4>::value evaluate to true ...