CppCast Episode 3: Cross Platform Mobile C++ in Visual Studio with Ankit Asthana -- Rob Irving

Episode 3 of CppCast, the only podcast by C++ developers for C++ developers. In this episode Ankit Asthana joins Rob Irving to talk about the new features in Visual Studio 2015 that enable C++ developers to build and debug Android applications from Microsoft's popular IDE.

CppCast Episode 3: Cross Platform Mobile C++ in Visual Studio with Ankit Asthana

by Rob Irving

About the interviewee:

Ankit Asthana is a program manager working in the Visual C++ Cross-Platform space. He is knowledgeable in cross-platform technologies, compilers (dynamic and static compilation, optimizer, code generation), distributed computing and server side development. He has in the past worked for IBM and Oracle Canada as a developer building Java 7 (hotspot) and telecommunication products. Ankit back in 2008 also published a book on C++ titled C++ for Beginners to Masters which sold over a few thousand copies.

When CLion met biicode -- Anastasia Kazakova

CLion is a new cross-platform IDE from JetBrains for C and C++ developers. And Biicode is a C/C++ dependency manager. This post is about a very simple and straightforward way to use biicode features together with CLion IDE to benefit from both.

When CLion met biicode

by Anastasia Kazakova

From the article:

CMake layout for the project is generated by biicode commands, after which you can open the project directly in CLion. You can resolve dependencies and install the missing libraries easily by using bii commands from the CLion built-in terminal (Alt+F12).

Take a short overview of the overall process and some available features...

Quick Q: Return a local object rvalue reference, right or wrong?

Quick A: Wrong!

Recently on SO:

Return a local object rvalue reference,right or wrong?

I see once return a local object,the compiler will take the return value optimization.(RVO,NRVO).

The part of the Standard blessing the RVO goes on to say that if the conditions for the RVO are met, but compilers choose not to perform copy elision, the object being returned must be treated as an rvalue.


So we just write code like this:

Widget makeWidget()
{
Widget w;
…
return w;//never use std::move(w);
}

I never see somebody write code like this:

Widget&& makeWidget()
{
Widget w;
…
return std::move(w);
}

I know that returns an lvalue reference of local object is always wrong. So, returns an rvalue reference of local object is also wrong?

Quick Q: Calling C++ Application Code from C library?

Quick A: You need to create a stub.

Recently on SO:

Calling C++ Application Code from C library?

Folks, Assuming I have a c++ application / library running which implements say

/* Alloc API */
void* my_alloc(int size) {
    return malloc(sizeof(size));
}

This is not under "extern c".

I have a C dynamic library from which I need to call my_alloc, can I directly call that API?

Like,

int test_my_alloc (int size) {
    int *x;

    x = (int*)my_alloc(size);
    if (x == NULL) {
        return 0;
    } else {
        return 1;
    }
}

CppCon 2014 Hardening Your Code--Marshall Clow

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Hardening Your Code

by Marshall Clow

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Ok, you've written some code, and it seems to work. How can you be sure that it works? It's a busy, complicated, dangerous world out there, and software has to work in lots of different environments.

How can you gain confidence about your code? How can you make your code more reliable?

There are a lot of techniques available to developers today; I'll talk about several of them: Unit tests, static analysis, runtime analysis, fuzzing, decoding compiler warnings and probably others.

CppCon 2014 Creative Coding with C++--Andrew Bell

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Creative Coding with C++

by Andrew Bell

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Realtime graphics, computer vision, hardware hacking, and audio synthesis are just a few of the crafts that fall under the banner term of "creative coding". In this session we'll talk about some of the creative projects putting C++ in places you might not expect it - everywhere from the Smithsonian's permanent design collection to robotic Coca-Cola dispensers on California beaches. We'll look at a wide spectrum of projects ranging from those of the "maker" community to commercial work from full-time professionals earning their livings in advertising and design agencies. And finally we'll take a look at how you can use the C++ you already know to jumpstart your own creative coding projects using the open source toolkit Cinder.

Stackless coroutines with Visual Studio 2015 -- Paolo Severini

From a totally unnecessary blog (we beg to differ):

Stackless coroutines with Visual Studio 2015

by Paolo Severini

From the article:

I had been looking for some time now at the problem of implementing coroutines/resumable functions in order to have even in C++ something similar to what is provided by C# await and yield statements. It turns out that -- unbeknown to me -- this is quite a hot topic in the C++ community...

... stackful coroutines have a big disadvantage in the fact that fibers are very expensive... The new proposal (N4286) instead focuses mostly on a stackless implementation, and promises to be scalable to billions of concurrent coroutines...