Tgui without Boost

Started by slimmeke, 06 July 2013, 14:40:59

slimmeke

Hey

I have create a TGui without Boost. All boost source is changed to C++11 (VS2012 does not support this functions).
You can find the source at: https://docs.google.com/file/d/0B7tTtE3e6xrTX3BSY1NMRHp3ejA/edit?usp=sharing

If you have downloaded this can U send a tnx or something so I can remove it from my GDrive.
I coudn't push it to the git.

Hope you can use this.

texus

Thanks, I'll use this when I start using c++11.
But once I start using c++11 I won't just get rid of boost, I will also use c++11 for the rest of the code, so this is only a small part of what I eventually will write. For tgui v0.6 I also aim to support at least VC++10 and GCC 4.6. So the use of c++11 will still be limited in v0.6.

netrick

#2
The big problem with C++11 is that in g++ 4.6 (which is the one used in ubuntu 12.04 lts) it doesn't support this:


class a
{
int m_var = 0; //default value
};


And you have to manually write big constructor's initializer lists :( Once I discovered this feature I am much more productive when writing new classes (it's so damn easier now). Unfortunately, it forced me to move to (L)ubuntu 13.04 so I have better C++11 support.

Why care about ubuntu? Well a majority of linux users use ubuntu and a majority of ubuntu users use LTS. However in april 2014 with ubuntu 14.04 lts the problem will be automatically fixed :)

The rest of C++11 features I use are available in g++ 4.6 so tgui 0.6 can still use many of c++11 (I'm yet to see modern distro with g++ 4.5 other than centos)

Tdm-gcc 4.7 is standard for Windows (shipped by codeblocks and codelite and generally widely-used) so no problem there.

And well, on those visual c++ users, I think we shouldn't care about them :) It's better to force them to use open and better compilers, with better c++11 support.

texus

Yeah, ubuntu is the reason that I aim at gcc 4.6 instead of 4.7.
If it was up to me I would go for gcc 4.8 which I already have on my arch linux (antergos actually) for some time, but then nobody would use my gui anymore :).

But there is no rush to rewrite it to c++11 as it has no advantages (for the user of my gui) but has the disadvantage of not being supported by older compilers. The only good thing would be that the boost dependency would be removed.

netrick

When you get into C++11, you can develop I think easily 30% faster, C++11 is much more productive and modern. So that would be an advantage for you.

I builded and set to default gcc 4.8 on ubuntu 12.04, but that forced me to rebuild every library and basically broke my system, so... it's very bad idea.

However I have acces to gcc 4.8 on my chakra (also arch based, very fast and kiss-oriented!), but then I wouldn't be able to compile my code on any other distro so I will wait with using gcc 4.8 features until it gets shipped with ubuntu (probably 13.10 I think).