Xcode 5: Bug in C++ standard library (std::bind)

While working on cross platform C++ library, I have found that this code crashes if compiled with Xcode 5:

#include <iostream>
#include <functional>

int main(int argc, const char * argv[])
    std::function<void(int)> function = [](int)
    auto binding = std::bind(function, 10);

    std::function<void()> jobFunctor = binding; // crashes here with EXC_BAD_ACCESS

    return 0;

When converting the result of the bind to jobFunctor there is an infinite stack recursion in a std::function constructor.

clang version:

LO50F-04-198BX:$ clang++ --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

Turns out there is official bug report about it: http://llvm.org/bugs/show_bug.cgi?id=18282

Above example works fine in Xcode 5.1.

IGK 2013

Capture2Last weekend(5-7 April) I have been on game development conference IGK in Siedlce. It was 10th anniversary so even that I had to take morning flight, and then another one to be back at work on Monday morning, it was worth it. I can’t say much about presentation that took place during the conference as I came at the end of second day, but I have started with my team (Kamil “ayufan” Trzciński, Konrad “Rodrigo” Rodzik, Jarek “agent_j” Pelczar) in 8h game programming contest “Compo” and it was awesome!

Continue reading…

Managing your GMail account

GMail is popular email service provided by Google. Whether it is your professional or private email, in both cases, your inbox can get filled with emails about different subjects, with some important more than others. Here I will tell you about few things that I have learnt about managing my inbox, and how to stay productive.

Continue reading…