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.
6
votes
1
answer
198
views
Eliminating duplication in Python native code function call dispatchers
I attempting to merge 3 functions into one, as they contain for the most part the same code.
Here are the original functions:
extern "C" PyObject *method_noargs_call_handler( PyObject *_self_and_nam …
3
votes
1
answer
5k
views
C++11 event system
I've implemented an events system in C++11. I've now got it pretty much as good as I can get it. It feels like I have found an optimal design pattern, and I'm using sensible variable names to illustra …
1
vote
1
answer
292
views
Homogenising iterator and const_iterator
I've reworked (for C++11) a section of PyCXX which contained an almost identical iterator and const_iterator.
I would like to know whether there is any way I can further tidy the code.
(Please bear …
2
votes
0
answers
194
views
Proxy pattern for supporting '... = ob[idx]->someObjMember = ...' type access
I've finally got a working Proxy pattern. The original task is presented here. My test case is on coliru.
It appears to flow through the correct pathways, however I am grateful for feedback and possi …
2
votes
1
answer
518
views
Static to Instance method trampolining with templates
I finally have a working trampoline mechanism. Would anyone care to critique it?
Ideone
#include <iostream>
using namespace std;
#include <map>
template<typename T>
class Base
{
public:
ty …
1
vote
Static to Instance method trampolining with templates
I will maintain my list of improvements in this answer.
There is a more succinct way to expose the mechanism to the consumer:
class Final : Base<Final>
{
register_method<&Final::Foo>( "foo" ); …
4
votes
3
answers
836
views
Use of macros to aid visual parsing of SFINAE template metaprogramming
I've recently been introduced to SFINAE to solve the problem of unwanted promotion precedence.
i.e. I was hoping to catch integer types with Foo::Foo(long) and floating-point types with Foo::Foo(doub …
0
votes
Use of macros to aid visual parsing of SFINAE template metaprogramming
Taking heed to Cort Ammon's critique, I have replaced all of my macros.
I agree that it is ugly to clutter the namespace with #define-s, which might be overwriting others, especially in a header file …