This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Meta-Programming using KTypeList

Tags: None
(comma "," separated)
The User
KDE Developer
Posts
647
Karma
0
OS

Meta-Programming using KTypeList

Thu Jun 25, 2009 10:39 pm
Hi!
I've created some generic code using KTypeList. How do you think about it? Do you think it would be useful in KDELibs-Utils? I think it's usable and it makes life easier.

Simple example for KCustomThread, it's an easy way to create threads:
Code: Select all
#include "kcustomthread.h"
#include
using namespace std;

int test2(int x)
{
   cout  thread(MAKE_TUPLE(1, i));
   thread.start();
   thread.wait();
   cout > str;
   cin >> i;
   KCustomThread thread(MAKE_TUPLE(2, str, i));
   thread.start();
   thread.wait();
   return 0;
}


Download: http://drop.io/oapylnj

I hope there will be feedback. ;)

The User


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], markhm, rblackwell, sethaaaa, Sogou [Bot], Yahoo [Bot]