Skip to content

Instantly share code, notes, and snippets.

#include <QCoreApplication>
#include <QTimer>
struct Test : public QObject
{
void foo() {}
};
int main(int argc, char *argv[])
{
@vprus
vprus / gist:282346f73b4d4e9f759e
Created July 9, 2015 10:20
C++11 result_of_t
#include <type_traits>
#include <iostream>
struct S {
int operator()(int) { return 1; }
};
int normal(int) { return 1;}
@vprus
vprus / boost.diff
Created February 19, 2015 08:47
global address-model and architecutre
diff --git a/Jamroot b/Jamroot
index d1b3c3a..779fe54 100644
--- a/Jamroot
+++ b/Jamroot
@@ -136,6 +136,8 @@ constant BOOST_JAMROOT_MODULE : $(__name__) ;
boostcpp.set-version $(BOOST_VERSION) ;
+use-project /boost/architecture : libs/config/checks/architecture ;
+
@vprus
vprus / gist:a38931b8f380bcf51669
Created August 27, 2014 06:17
Example of post-install action in Boost.Build
import notfile ;
exe hello : hello.cpp ;
notfile install : @postinstall : install-really ;
install install-really : hello : <location>dist ;
explicit install-really ;
actions postinstall
{
@vprus
vprus / README.md
Last active August 29, 2015 14:03
Rectangles in SVG

Example of using half-pixel coordinates with SVG.

@vprus
vprus / gist:8860225
Created February 7, 2014 10:19
Pebble normal vs. text layers
#include <pebble.h>
#include <pebble_fonts.h>
static Window *window;
static Layer *left;
static TextLayer *right;
static GFont font;
static void draw_left(Layer *layer, GContext *ctx) {