When I see this CPP Con 2017 webinar, Fedor Pikus says: "it has to be direct initialization"
This is the link to the webinar.
What are the differences between these initialization methods? (and subsequently, why it has to be a "direct" initialization? why "indirect" initialization is "NOT"?)
// C++17 Compiler
#include <atomic>
class Example
{
std::atomic<bool> m_b1 = false; // 1-h
std::atomic<bool> m_b2{ false }; // 2-h
static void doSomethng()
{
std::atomic<bool> b1 = false; // 1-f
std::atomic<bool> b2{ false }; // 2-f
std::atomic<bool> b3(false); // 3-f
// Do something
}
};