Profile cover photo
Profile photo
TONGARI's posts

Post has attachment
I'm looking for early adopters of my C++11 coroutine emulation library, if you'd ever heard of `await` from C# or the C++ proposal for resumable function, you should be interested.

Post has attachment
Has anybody tried `await` proposed by Microsoft?
For the uninitiated, N4287 is a good read. I like the idea of await, and I even wrote a small lib to bridge ASIO, but I found their prototype shipped with VS2015 preview is not stable and buggy,  so I won't recommend others to use it for now...

Hi, I want to apply multi-GPU setting for CUDA but the other slot on my motherboard is CrossFire, will that work?

What I learned today:

[C++11: 7.5/1]
Two function types with different language linkages are distinct types even if they are otherwise identical

But seems neither g++ nor clang respects the rule:

For those interested, it was from this SO answer:

Post has attachment
Another c++1y lambda example, see how to make lambda overloadable & recursive, without std::function.

Post has attachment
Already know how to do args packing/unpacking with tuple? Take a look at how to do it without tuple.

C++ Function Benchmark

Besides std::function, there are many similar alternatives around the world. And I recently bother to write one myself (not completely std::function compatible though). Not because NIH syndrome or any performance concern of std::function, but for functional improvement -- it supports multi-signature.

As a byproduct, I wrote a benchmark for various function implementations I found, you can find it here:

It seems that with g++ or clang, the tail-padding can be reused if the base's data members are private, see

No luck with MSVC.

What C++ language features are most important/useful to you?
Here's my top 10 (not strictly ranked):

1. Destructor
2. Template
3. Inheritance (single/multi)
4. Overloading (function/operator)
5. Pointer/Reference (*/&/&&)
6. Type Deduction (auto/decltype, C++11)
7. Virtual Function
8. Lambda (C++11)
9. Range-based For-loop (C++11)
10. Constructor Delegation (C++11)

ADL, Const, Access Specifier, and others are also important, just can't list them all :)

Post has attachment
Does anyone know how auto&& would extend the life-time of the temporary object? I can't find the words anywhere in the standard.

Here's my concern:
Wait while more posts are being loaded