So close, but so far away

strcpy_s(dest, strlen(src),src);

Posted in english, kde

Compilers and error messages

So. I typo’ed up some template code the other day. And once again I learned the importance of using several c++ compilers.

Here is a very reduced version of my code:

#include <utility>
template <typename T> auto foo(const T& t) -> decltype(x.first)
{
return t.first;
}
int main()
{
foo(std::make_pair(1,2));
return 0;
}

And let’s start with the compiler I was testing with first.

MSVC (2013 and 2015)

main.cpp(8): error C2672: ‘foo’: no matching overloaded function found
main.cpp(8): error C2893: Failed to specialize function template ‘unknown-type foo(const T &)’

It is not completely clear from that error message what’s going on, so let’s try some other compilers:

GCC (4.9-5.3)

2 : error: ‘x’ was not declared in this scope
template <typename T> auto foo(const T& t) -> decltype(x.first)

That’s pretty clear. More compilers:

Clang (3.3-3.7)

2 : error: use of undeclared identifier ‘x’
template <typename T> auto foo(const T& t) -> decltype(x.first)

ICC (13)

example.cpp(2): error: identifier “x” is undefined
template <typename T> auto foo(const T& t) -> decltype(x.first)

(Yes. I mistyped the variable name used for decltype. Replacing the x with t makes it build).

Thanks to http://gcc.godbolt.org/ and http://webcompiler.cloudapp.net/ for testing with various compilers.

Posted in english, kde, qt

KDE at Qt World Summit

So. KDE has landed at Qt World Summit.

kdeboothqtws2015

You can come and visit our booth and …

  • hear about our amazing Free Qt Addons (KDE Frameworks)
  • stories about our development tools
  • meet some of our developers
  • Talk about KDE in general
  • Or just say hi!

KDE – 19 years of Qt Experience.

Posted in english, kde, qt

I accidentally the Debian menu

So quite some time ago, I filed this. After some going back and forth, it lead to this. And finally we have a conclusion. It took only two years, but now we are there. Let’s continue make Debian rock.

Posted in debian, english

Debconf 2015 – 7

The other day, the main talk was “Lets encrypt”, today it was “Let’s reproduce”

Posted in debian, english

Debconf 2015 – 6

There is more people with blue hair at Debconf than at an average Akademy. KDE – we need to do better :)

Posted in debian, english, kde

Debconf 2015 – 5

Watching people figuring out how to use a Danish cheese slicer is kind interesting. But by using enough force most people succeeding in getting a lump of cheese.

Posted in debian, english

Debconf 2015 – 4

“I refuse to be bound by software I cannot negotiate with” — enrico

Posted in debian, english

Debconf 2015 – 3

It is still an open question what the Debian Project Leader wears under their kilt.

Posted in debian, english

Debconf 2015 – 2

It is amazing at debconf when your Application Manager is rocking the dance floor!

Posted in debian, english