Quantcast
Channel: Bartek's coding blog
Viewing all 325 articles
Browse latest View live

std::filesystem in C++17 In Detail

$
0
0

C++17 In Detail

On Friday 18th January I’ve pushed another update for the book. This time I rewrote the whole chapter about std::filesystem. Please have a look at what changed and what are the plans.

The book got more than 25 new pages!

Read more...

C++ Links #17

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 26th of January and 1st of February 2019.

This week you will find a link to all 177 papers before next ISO C++ Meeting in Kona, link to an article that sums up the current state of C++ Modules and many more!

Read more...

C++ Links #18

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 2nd and 8th of February 2019.

In this week you will find a link to interesting CMake features, a detailed description of the std::rotate algorithm and many more!

Read more...

2 Lines Of Code and 3 C++17 Features - The overload Pattern

$
0
0

the overload patter C++17

While I was doing research for my book and blog posts about C++17 several times I stumbled upon this pattern for visitation of std::variant:

template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
template<class... Ts> overload(Ts...) -> overload<Ts...>;

std::variant<int, float> intFloat { 0.0f };
std::visit(overload(
[](constint& i) { ... },
[](constfloat& f) { ... },
),
intFloat;
);

With the above pattern, you can provide separate lambdas “in-place” for visitation.

It’s just two lines of compact C++ code, but it packs a few interesting concepts.

Let’s see how this thing works and go through the three new C++17 features that enable this one by one.

Read more...

C++ Links #19

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 9th and 15th of February 2019.

In this week you will find a link to a great post about a technique that can help reduce compilation time, an article that explains how Smart Iterators are working and many more!

Read more...

Five Awesome C++ Papers For Kona 2019 ISO Meeting

$
0
0

Kona 2019 ISO C++ Meeting

I’m just in time (I hope)! In a few hours, a new C++ISO meeting will start! This time the committee gathered in Kona, Hawaii for their first meeting in 2019.

Let’s see what’s already in C++20 and let’s have a look at some smaller, but very handy proposals that might get into the standard.

Read more...

C++ Links #20

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 16th and 22nd of February 2019.

This week you will find a link to a few interesting papers from the Kona ISO C++ Meeting, how to set bitmask using Designated Initializers and many more!

Read more...

Lambdas: From C++11 to C++20, Part 1

$
0
0

Lambda expression, C++11

Lambda expressions are one of the most powerful additions to C++11, and they continue to evolve with each new C++ language standard. In this article, we’ll go through history and see the evolution of this crucial part of modern C++.

Read more...

C++ Links #21

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 23rd February and 1st of March 2019.

This week we have a massive update on the upcoming C++ Standard - Kona Meeting reports. Then you can also read about the history of lambdas, about smart iterators and more.

Read more...

C++17 In Detail is 100% Ready!

$
0
0

C++17 In Detail

I released “C++17 In Detail” in August 2018, and I set the status to 90%. I didn’t expect that writing of that remaining 10% would take me so long :) Now it’s high time to set the counter to 100%.

That’s why I’m pleased to announce that my book “C++17 In Detail” is now done!

See the recent changes, a new code sample and check out the promo!

Read more...

C++ Links #22

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 2nd and 8th of March 2019.

This week you will find links to articles about accepted Modules proposal, a great MSVC improvement that is reducing binaries with C++ exceptions by 20% and many more!

Read more...

Lambdas: From C++11 to C++20, Part 2

$
0
0

Lambda expression, from C++11 to C++20

In the first part of the series we looked at lambdas from the perspective of C++03, C++11 and C++14. In that article, I described the motivation behind this powerful C++ feature, basic usage, syntax and improvements in each of the language standards. I also mentioned several corner cases.

Now it’s time to move into C++17 and look a bit into the future (very near future!): C++20.

Read more...

Dark Corner of C++ Corner Cases

$
0
0

Darker C++

The C ++ 17 standard consists of almost two thousands pages. Two thousand pages describing every single aspect of the language. Some pages relates to all kinds of details, exceptions, and things that you do not care about every day. We will try to look at a few such cases, which we hope never see in the production code.

Read more...

C++ Links #23 - Top 10 Bugs, Funny Papers and MSVC Performance!

C++ Lambda Story - A Free Ebook

$
0
0

C++ Lambda Story

Lambdas are one of the most prominent and useful elements of modern C++. They can significantly reduce the code and make it more expressive. The feature might look easy, but there are a lot of details that you need to know to master it. This free ebook will help you with that!

Read more...

C++ Links #24 -static vs dynamic libraries, ADL & BooSTL!

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 23th and 29th of March 2019.

This week you will find links to a detailed comparison of using static vs dynamic libraries, how we can discover code smell using static analyser and many more!

Read more...

C++ April Fool's Quiz

$
0
0

C++ Quiz

It’s April Fool’s Day, so let’s have some fun :) Last year I announced fake news about C++: deprecation of Raw Pointers and two years ago I wanted to have C++18. So what’s coming this time?

A quiz!

Answer the questions, and find two that makes no sense and don’t have any correct answer… can you solve such test?

Read more...

C++ Links #25 - 75 articles in two months & understanding modules!

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 30th of March and 5th of April 2019.

Read more...

C++ Links #26 - co_awaiting coroutines and new boost libraries

$
0
0

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 6th and 12th of April 2019.

In this week you will find the link to post about co_awaiting coroutines, link to an article how to write spaceship operator with std::tuple& CRTP pattern and many more!

Read more...

How to Iterate Through Directories in C++

$
0
0

How To Iterate Directory in C++

How would you implement a function that searches for files with a given extension? For example, finding all text files? or *.cpp files? To code that solution you need a way to iterate through directories. Is that possible in C++ out of the box using the standard library? Let’s see some techniques and new elements that C++17 added.

Read more...
Viewing all 325 articles
Browse latest View live