SlideShare a Scribd company logo
C++17 NOW
IGOR SADCHENKO
IGOR.SADCHENKO@GMAIL.COM
STANDARDIZATION
2
C++ COREHARD SPRING 2017 // STANDARDIZATION
IGOR SADCHENKO // C++ COREHARD // 13.05.17
CURRENT STATUS
3
C++ COREHARD SPRING 2017 // STANDARDIZATION
IGOR SADCHENKO // C++ COREHARD // 13.05.17
4
C++ COREHARD SPRING 2017 // STANDARDIZATION
IGOR SADCHENKO // C++ COREHARD // 13.05.17
WG21 C++ Russia
C++17 COMPILER SUPPORT
6
C++ COREHARD SPRING 2017 // C++17 COMPILER SUPPORT
IGOR SADCHENKO // C++ COREHARD // 13.05.17
7
C++ COREHARD SPRING 2017 // СТАТУС ПОДДЕРЖКИ СТАНДАРТА С++17
IGOR SADCHENKO // C++ COREHARD // 13.05.17
8
C++ COREHARD SPRING 2017 // СТАТУС ПОДДЕРЖКИ СТАНДАРТА С++17
IGOR SADCHENKO // C++ COREHARD // 13.05.17
DETAILS
10
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
NEW AUTO RULES FOR DIRECT-LIST-INITIALIZATION(N3922)
GCC: 5.0 Clang: 3.8 MSVS: 14.0
direct list initialization: T object {arg1, arg2, ...};
copy list initialization: T object = {arg1, arg2, ...};
auto a = { 42 }; // std::initializer_list<int>
auto b { 42 }; // now int, before was std::initializer_list<int>
auto c = { 1, 2 }; // std::initializer_list<int>
auto d { 1, 2 }; // ill-formed, too many elements
auto e { 1, 2.0}; // ill-formed, different type
11
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STATIC_ASSERT WITH NO MESSAGE(N3928)
GCC: 6.0 Clang: 2.5 MSVS: 15.0
static_assert-declaration:
static_assert (constant-expression) ;
static_assert (constant-expression, string-literal) ;
static_assert(foo > bar);
...
static_assert(foo != bar);
12
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
TYPENAME IN A TEMPLATE TEMPLATE PARAMETER(N4051)
GCC: 5.0 Clang: 3.5 MSVS: 14.0
template<typename T> struct A {};
template<typename T> using B = int;
template<template<typename> class X> struct C {};
C<A> ca; // ok
C<B> cb; // ok, not a class template
template<template<typename> typename X> struct D; // was error
13
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
REMOVING TRIGRAPHS(N4086)
GCC: 5.1 Clang: 3.5 MSVS: 14.0
Removes ??=, ??(, ??>, etc
But we have digraph
??=include <iostream> /* # */
int main()
??< /* { */
char n??(??) = "Hello CoreHard_"; /* [ and ] */
n??(14??) = '0' + (??-0 ??' 1 ??! 2); /* ~, ^ and | */
std::cout << n << "??/n"; /* ??/ =  */
return 0;
??>
14
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
NESTED NAMESPACE DEFINITION(N4230)
GCC: 6.0 Clang: 3.6 MSVS: 14.3
Allows to write:
namespace A::B::C {
// some code
}
Rather than:
namespace A {
namespace B {
namespace C {
// some code
}
}
}
15
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
NESTED NAMESPACE DEFINITION(N4230)
GCC: 6.0 Clang: 3.6 MSVS: 14.3
Allows to write:
namespace A::B::C {
// some code
}
Rather than:
namespace A {
namespace B {
namespace C {
// some code
}
}
}
namespace A::B::C::D {
namespace A::B::C::D {
namespace A::B::C::D {
namespace A::B::C::D {
// some code
}
}
}
}
16
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
ATTRIBUTES FOR NAMESPACES AND ENUMERATORS(N4266)
GCC: 4.9(ns)/6.0(enum) Clang: 3.4 MSVS: 14.0(no enum)
enum E {
foo = 0,
foobar[[deprecated]] = foo
};
E e = foobar; // warning
namespace[[deprecated]] legacy{
void func() {}
}
legacy::func(); // warning, error in msvs14.3)
17
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
U8 CHARACTER LITERALS(N4267)
GCC: 6.0 Clang: 3.6 MSVS: 14.0
UTF-8 character literal, e.g. u8'a'. Such literal has type char and
the value equal to ISO 10646 code point value of c-char, provided
that the code point value is representable with a single UTF-8
code unit. If c-char is not in Basic Latin or C0 Controls Unicode
block, the program is ill-formed.
The compiler will report errors if character cannot fit inside u8
ASCII range.
char c = u8'Ё'; // too many characters in constant
18
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
ALLOW CONSTANT EVALUATION FOR ALL NON-TYPE TEMPLATE ARGUMENTS(N4268)
GCC: 6.0 Clang: 3.6 MSVS:no
template<int *p> struct A {};
int n;
A<&n> a; // ok
constexpr int *p() { return &n; }
A<p()> b; // error before C++17
19
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
FOLD EXPRESSIONS(N4295)
GCC: 6.0 Clang: 3.6 MSVS: no
Reduces (folds) a parameter pack over a binary operator.
(pack op ...) // unary right fold
(... op pack) // unary left fold
(pack op ... op init) // binary right fold
(init op ... op pack) // binary left fold
Explanation:
1) Unary right fold (E op ...) becomes E1 op (... op (EN-1 op EN))
2) Unary left fold (... op E) becomes ((E1 op E2) op ...) op EN
3) Binary right fold (E op ... op I) becomes E1 op (... op (EN−1 op (EN op I)))
4) Binary left fold (I op ... op E) becomes (((I op E1) op E2) op ...) op EN
C++17 support 32 binary operators in fold expressions
20
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
FOLD EXPRESSIONS(N4295)
GCC: 6.0 Clang: 3.6 MSVS: no
Allows to write compact code with variadic templates without using explicit
recursion. C++17 support 32 binary operators in fold expressions.
Before:
Now:
bool all() {
return true;
}
template<typename T, typename ...Args>
bool all(T t, Args ... args) {
return t && all(args...);
}
template<typename... Args>
bool all(Args... args) {
return (... && args);
}
21
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
UNARY FOLD EXPRESSIONS AND EMPTY PARAMETER PACKS(P0036R0)
GCC: 6.0 Clang: 3.9 MSVS: no
When a unary fold is used with a pack expansion of length zero,
only the following operators are allowed:
1) Logical AND (&&). The value for the empty pack is true
2) Logical OR (||). The value for the empty pack is false
3) The comma operator (,). The value for the empty pack is void()
For any operator not listed above, an unary fold expression with
an empty parameter pack is ill-formed.
22
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
REMOVING
Remove deprecated use of the register keyword(P0001R1)
GCC: 7.0 Clang: 3.8 MSVS: no
Remove deprecated operator++(bool)(P0002R1)
GCC: 7.0 Clang: 3.8 MSVS: no
Removing deprecated exception specifications from C++17(P0003R5)
GCC: 7.0 Clang: 4.0 MSVS: no
Removal of some deprecated types and functions, including
std::auto_ptr, std::random_shuffle, and old function adaptors(N4190)
23
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
MAKE EXCEPTION SPECIFICATIONS PART OF THE TYPE SYSTEM(P0012R1)
GCC: 7.0 Clang: 4.0 MSVS: no
Until C++17 exception specifications for a function didn’t belong to
the type of the function, but it will be part of it.
void(*pf)();
void(**ppf)() noexcept = &pf; // error: cannot convert to pointer noexcept function
struct S { typedef void(*pf)(); operator pf(); };
void(*q)() noexcept = S(); // error: cannot convert to pointer noexcept function
24
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
AGGREGATE INITIALIZATION OF CLASSES WITH BASE CLASSES(P0017R1)
GCC: 7.0 Clang: 3.9 MSVS: no
An aggregate is an array or a class with:
* no user-provided constructors (including those inherited from a base class),
* no private or protected non-static data members,
* no virtual functions, and
* no virtual, private or protected base classes
struct Base { int a1, a2; };
struct Derived : Base { int b1; };
Derived d1{ { 1, 2 }, 3 }; // full explicit initialization
Derived d2{ {}, 1 }; // the base is value initialized
25
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
LAMBDA CAPTURE OF *THIS(P0018R3)
GCC: 7.0 Clang: 3.9 MSVS: no
Capturing this in a lambda's environment was previously
reference-only.
*this (C++17) will now make a copy of the current object, while
this (C++11) continues to capture by reference.
struct Foo {
int value{ 25 };
void test() {
auto getValueCopy = [*this] { return value; };
auto getValueRef = [this] { return value; };
value = 27
getValueCopy(); // 25
getValueRef(); // 27
}
};
26
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
__HAS_INCLUDE IN PREPROCESSOR CONDITIONALS(P0061R1)
GCC: 5.0 Clang: 5.0 MSVS: no
This feature allows a C++ program to directly, reliably and
portably determine whether or not a library header is available
for inclusion.
#if __has_include(<string_view>)
#include <string_view>
#define has_string_view 1
#elif __has_include(<experimental/string_view>)
#include <experimental/string_view>
#define has_string_view 1
#define experimental_string_view 1
#else
#define has_string_view 0
#endif
27
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
TEMPLATE ARGUMENT DEDUCTION FOR CLASS TEMPLATES(P0091R3)
GCC: 7.0 Clang: no MSVS: no
Before C++17, template deduction worked for functions but not
for classes.
std::make_pair("aaa"s, 111);
In C++17 template class constructors can deduce type
parameters.
std::pair("aaa"s, 111);
28
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
TEMPLATE ARGUMENT DEDUCTION FOR CLASS TEMPLATES(P0091R3)
GCC: 7.0 Clang: no MSVS: no
Before C++17, template deduction worked for functions but not
for classes.
std::make_pair("aaa"s, 111);
In C++17 template class constructors can deduce type
parameters.
std::pair("aaa"s, 111);
std::tuple(
[](){}, [](){}, [](){}, [](){}, [](){}, [](){},
[](){}, [](){}, [](){}, [](){}, [](){}, [](){},
[](){}, [](){}, [](){}, [](){}, [](){}, [](){},
);
29
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
NON-TYPE TEMPLATE PARAMETERS WITH AUTO TYPE(P0127R2)
GCC: 7.0 Clang: 4.0 MSVS: no
Automatically deduce type on non-type template parameters.
template <auto value> void f() { }
f<10>(); // deduces int
30
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
CONSTEXPR LAMBDA EXPRESSIONS(P0170R1)
GCC: 7.0 Clang: no MSVS: no
Compile-time lambdas using constexpr.
auto identity = [](int n) constexpr { return n; };
static_assert(identity(123) == 123);
constexpr auto add = [](int x, int y) {
auto L = [=] { return x; };
auto R = [=] { return y; };
return [=] { return L() + R(); };
};
static_assert(add(1, 2)() == 3);
constexpr int addOne(int n) {
return [n] { return n + 1; }();
}
static_assert(addOne(1) == 2);
31
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
ATTRIBUTES
GCC: 7.0 Clang: 3.9 MSVS: no
[[fallthrough]] attribute (P0188R1)
[[nodiscard]] attribute(P0189R1)
[[maybe_unused]] attribute
Ignore unknown attributes(P0283R2)
Using attribute namespaces without repetition(P0028R4)
32
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
PACK EXPANSIONS IN USING-DECLARATIONS(P0195R2)
GCC: 7.0 Clang: 4.0 MSVS: no
Allows you to inject names with using-declarations from all types in a parameter pack.
template <typename T, typename... Ts>
struct Overloader : T, Overloader<Ts...> {
using T::operator();
using Overloader<Ts...>::operator();
// […] until
};
template <typename T> struct Overloader<T> : T {
using T::operator();
};
template <typename... Ts>
struct Overloader : Ts... {
using Ts::operator()...;
// […] С++17
};
33
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
DECOMPOSITION DECLARATIONS(P0217R3)
GCC: 7.0 Clang: 4.0 MSVS: no
For example:
std::tie(a, b, c) = tuple; // a, b, c need to be declared first
std::array<T, 3> f();
std::tie(x, y, z) = f(); // INVALID.
Now we can write:
auto [a, b, c] = tuple;
auto [a, b, c] = f();
Such expressions also work on structs, pairs, and arrays.
34
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
INIT-STATEMENTS FOR IF AND SWITCH(P0305R1)
GCC: 7.0 Clang: 3.9 MSVS: no
New versions of the if and switch statements for C++:
if (init; condition) and switch (init; condition).
Now you can write:
if (auto val = GetValue(); condition(val))
// on success
else
// on false...
35
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
INLINE VARIABLES(P0386R2)
GCC: 7.0 Clang: 3.9 MSVS: no
A variable declared inline has the same semantics as a function declared inline: it can be
defined, identically, in multiple translation units, must be defined in every translation unit in
which it is used, and the behavior of the program is as if there is exactly one variable.
struct Foo
{
static const int sValue;
};
inline int const Foo::sValue = 777;
Or:
struct Foo
{
inline static const int sValue = 777;
};
36
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STD::UNCAUGHT_EXCEPTIONS() (N4259)
GCC: 6.0 Clang: 3.7 MSVS: 14.0
The function returns the number of uncaught exception objects
in the current thread.
A type that wants to know whether its destructor is being run to
unwind this object can query uncaught_exceptions
in its constructor and store the result, then query
uncaught_exceptions again in its destructor; if the result is
different,
then this destructor is being invoked as part of stack unwinding
due to a new exception that was thrown later than the object’s
construction
37
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
CONSTEXPR IF-STATEMENTS(P0292R2)
GCC: 7.0 Clang: 3.9 MSVS: no
if constexpr(cond)
statement1; // Discarded if cond is false
else
statement2; // Discarded if cond is true
38
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STD::VARIANT
The class template std::variant represents a type-safe union. An
instance of std::variant at any given time holds a value of one of
its alternative types (it's also possible for it to be valueless).
std::variant<int, double> v{ 12 };
std::get<int>(v); // == 12
std::get<0>(v); // == 12
v = 12.0;
std::get<double>(v); // == 12.0
std::get<1>(v); // == 12.0
39
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STD::OPTIONAL
The class template std::optional manages an optional contained value, i.e. a value that may or
may not be present. A common use case for optional is the return value of a function that may
fail.
std::optional<std::string> create(bool b) {
if (b)
return "Godzilla";
else
return {};
}
create(false).value_or("empty"); // == "empty"
create(true).value(); // == "Godzilla"
// optional-returning factory functions are usable as conditions of while and if
if (auto str = create(true)) {
// ...
}
40
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STRING_VIEW
The class template basic_string_view describes an object that can refer to a
constant contiguous sequence of char-like objects with the first element of the
sequence at position zero.
A typical implementation holds only two members: a pointer to constant CharT
and a size.
// Regular strings.
std::string_view cppstr{ "foo" };
// Wide strings.
std::wstring_view wcstr_v{ L"baz" };
// Character arrays.
char array[3] = { 'b', 'a', 'r' };
std::string_view array_v(array, sizeof array);
std::string str{ " trim me" };
std::string_view v{ str };
v.remove_prefix(std::min(v.find_first_not_of(" "), v.size()));
str; // == " trim me"
v; // == "trim me"
41
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STRING_VIEW
Problem
class foo
{
std::string str_;
public:
std::string_view get_str() const
{
// substr starting at index 1 till the end
return str_.substr(1u);
}
};
42
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
STRING_VIEW
Solution
class foo
{
std::string str_;
public:
std::string_view get_str() const
{
// substr starting at index 1 till the end
return std::string_view(str_).substr(1u);
}
};
43
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
FILE_SYSTEM
GCC: 6.0 Clang: 3.9 MSVS: 14.0
The Filesystem library provides facilities for performing operations on file systems and their
components, such as paths, regular files, and directories.
The filesystem library was originally developed as boost.filesystem
Structure:
path - represents a path
filesystem_error - an exception thrown on file system errors
directory_entry - a directory entry
directory_iterator - an iterator to the contents of the directory
recursive_directory_iterator - an iterator to the contents of a directory and its subdirectories
file_status - represents file type and permissions
space_info - information about free and available space on the filesystem
file_type - the type of a file
44
C++ COREHARD SPRING 2017 //
IGOR SADCHENKO // C++ COREHARD // 13.05.17
ETC
std::any
std::byte
std:invoke
std::is_callable
std::apply
parallels algorithm
improved math
SUMMARY
46
C++ COREHARD SPRING 2017 // SUMMARY
IGOR SADCHENKO // C++ COREHARD // 13.05.17
CONCLUSION
• New standards are almost supported by compilers by the time of
release
• You can help make new C++ better
• C++ gets harder
• It is С++!
47
C++ COREHARD SPRING 2017 // SUMMARY
IGOR SADCHENKO // C++ COREHARD // 13.05.17
LINKS
Last draft
http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4618.pdf
Current status of C++ standardization
https://isocpp.org/std/status
https://www.iso.org/standard/68564.html
WG21 C++ Russia
https://stdcpp.ru/
C++17 compiler support
http://en.cppreference.com/w/cpp/compiler_support
https://gcc.gnu.org/projects/cxx-status.html#cxx1z
http://clang.llvm.org/cxx_status.html#cxx17
https://blogs.msdn.microsoft.com/vcblog/2017/05/10/c17-features-in-vs-2017-3/
C++17 Features overview
http://www.bfilipek.com/2017/01/cpp17features.html
https://github.com/AnthonyCalandra/modern-cpp-features#stdstring_view
THANK YOU FOR YOUR
ATTENTION!
IGOR SADCHENKO
software developer
+375 33 642 92 91
https://www.facebook.com/WargamingMinsk
ANY QUESTIONS?
igor.sadchenko@gmail.com
wargaming.com
https://www.linkedin.com/company/wargaming-net

More Related Content

What's hot

Global Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the SealGlobal Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the Seal
Tzung-Bi Shih
 
Boosting Developer Productivity with Clang
Boosting Developer Productivity with ClangBoosting Developer Productivity with Clang
Boosting Developer Productivity with Clang
Samsung Open Source Group
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
Platonov Sergey
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
Sergey Platonov
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
Bo-Yi Wu
 
TensorFlow XLA RPC
TensorFlow XLA RPCTensorFlow XLA RPC
TensorFlow XLA RPC
Mr. Vengineer
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' Mistakes
Andrey Karpov
 
Антон Наумович, Система автоматической крэш-аналитики своими средствами
Антон Наумович, Система автоматической крэш-аналитики своими средствамиАнтон Наумович, Система автоматической крэш-аналитики своими средствами
Антон Наумович, Система автоматической крэш-аналитики своими средствами
Sergey Platonov
 
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
PROIDEA
 
Qt Rest Server
Qt Rest ServerQt Rest Server
Qt Rest Server
Vasiliy Sorokin
 
Bridge TensorFlow to run on Intel nGraph backends (v0.5)
Bridge TensorFlow to run on Intel nGraph backends (v0.5)Bridge TensorFlow to run on Intel nGraph backends (v0.5)
Bridge TensorFlow to run on Intel nGraph backends (v0.5)
Mr. Vengineer
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
Linaro
 
Windbg랑 친해지기
Windbg랑 친해지기Windbg랑 친해지기
Windbg랑 친해지기
Ji Hun Kim
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
Sergey Platonov
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
 
C++ amp on linux
C++ amp on linuxC++ amp on linux
C++ amp on linux
Miller Lee
 
Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.
Platonov Sergey
 
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
Tzung-Bi Shih
 
Fuzzing: The New Unit Testing
Fuzzing: The New Unit TestingFuzzing: The New Unit Testing
Fuzzing: The New Unit Testing
Dmitry Vyukov
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
Badoo Development
 

What's hot (20)

Global Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the SealGlobal Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the Seal
 
Boosting Developer Productivity with Clang
Boosting Developer Productivity with ClangBoosting Developer Productivity with Clang
Boosting Developer Productivity with Clang
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
TensorFlow XLA RPC
TensorFlow XLA RPCTensorFlow XLA RPC
TensorFlow XLA RPC
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' Mistakes
 
Антон Наумович, Система автоматической крэш-аналитики своими средствами
Антон Наумович, Система автоматической крэш-аналитики своими средствамиАнтон Наумович, Система автоматической крэш-аналитики своими средствами
Антон Наумович, Система автоматической крэш-аналитики своими средствами
 
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
4Developers 2018: Evolution of C++ Class Design (Mariusz Łapiński)
 
Qt Rest Server
Qt Rest ServerQt Rest Server
Qt Rest Server
 
Bridge TensorFlow to run on Intel nGraph backends (v0.5)
Bridge TensorFlow to run on Intel nGraph backends (v0.5)Bridge TensorFlow to run on Intel nGraph backends (v0.5)
Bridge TensorFlow to run on Intel nGraph backends (v0.5)
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
 
Windbg랑 친해지기
Windbg랑 친해지기Windbg랑 친해지기
Windbg랑 친해지기
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
 
C++ amp on linux
C++ amp on linuxC++ amp on linux
C++ amp on linux
 
Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.
 
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat &lt; /dev/zero > GIL;
 
Fuzzing: The New Unit Testing
Fuzzing: The New Unit TestingFuzzing: The New Unit Testing
Fuzzing: The New Unit Testing
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
 

Similar to C++17 now

4Developers 2018: Beyond c++17 (Mateusz Pusz)
4Developers 2018: Beyond c++17 (Mateusz Pusz)4Developers 2018: Beyond c++17 (Mateusz Pusz)
4Developers 2018: Beyond c++17 (Mateusz Pusz)
PROIDEA
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
Microsoft Tech Community
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
Microsoft Tech Community
 
C++ Core Guidelines
C++ Core GuidelinesC++ Core Guidelines
C++ Core Guidelines
Thomas Pollak
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdpPradeep Kumar TS
 
Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11
corehard_by
 
C++20 the small things - Timur Doumler
C++20 the small things - Timur DoumlerC++20 the small things - Timur Doumler
C++20 the small things - Timur Doumler
corehard_by
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
Linaro
 
C Programming Homework Help
C Programming Homework HelpC Programming Homework Help
C Programming Homework Help
Programming Homework Help
 
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYCS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
Radha Maruthiyan
 
2. data, operators, io
2. data, operators, io2. data, operators, io
2. data, operators, io
Srichandan Sobhanayak
 
C basics
C basicsC basics
C basics
Daniela Da Cruz
 
Strategy and best practice for modern RPG
Strategy and best practice for modern RPGStrategy and best practice for modern RPG
Strategy and best practice for modern RPG
Alemanalfredo
 
Computer Networks Lab File
Computer Networks Lab FileComputer Networks Lab File
Computer Networks Lab File
Kandarp Tiwari
 
The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196
Mahmoud Samir Fayed
 
2. Data, Operators, IO (5).ppt
2. Data, Operators, IO (5).ppt2. Data, Operators, IO (5).ppt
2. Data, Operators, IO (5).ppt
Elisée Ndjabu
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code Contracts
PVS-Studio
 
Eta lang Beauty And The Beast
Eta lang Beauty And The Beast Eta lang Beauty And The Beast
Eta lang Beauty And The Beast
Jarek Ratajski
 
Debugging and Profiling C++ Template Metaprograms
Debugging and Profiling C++ Template MetaprogramsDebugging and Profiling C++ Template Metaprograms
Debugging and Profiling C++ Template Metaprograms
Platonov Sergey
 
Runtime Code Generation and Data Management for Heterogeneous Computing in Java
Runtime Code Generation and Data Management for Heterogeneous Computing in JavaRuntime Code Generation and Data Management for Heterogeneous Computing in Java
Runtime Code Generation and Data Management for Heterogeneous Computing in Java
Juan Fumero
 

Similar to C++17 now (20)

4Developers 2018: Beyond c++17 (Mateusz Pusz)
4Developers 2018: Beyond c++17 (Mateusz Pusz)4Developers 2018: Beyond c++17 (Mateusz Pusz)
4Developers 2018: Beyond c++17 (Mateusz Pusz)
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
 
C++ Core Guidelines
C++ Core GuidelinesC++ Core Guidelines
C++ Core Guidelines
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdp
 
Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11Mixing C++ & Python II: Pybind11
Mixing C++ & Python II: Pybind11
 
C++20 the small things - Timur Doumler
C++20 the small things - Timur DoumlerC++20 the small things - Timur Doumler
C++20 the small things - Timur Doumler
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
 
C Programming Homework Help
C Programming Homework HelpC Programming Homework Help
C Programming Homework Help
 
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYCS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
 
2. data, operators, io
2. data, operators, io2. data, operators, io
2. data, operators, io
 
C basics
C basicsC basics
C basics
 
Strategy and best practice for modern RPG
Strategy and best practice for modern RPGStrategy and best practice for modern RPG
Strategy and best practice for modern RPG
 
Computer Networks Lab File
Computer Networks Lab FileComputer Networks Lab File
Computer Networks Lab File
 
The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196
 
2. Data, Operators, IO (5).ppt
2. Data, Operators, IO (5).ppt2. Data, Operators, IO (5).ppt
2. Data, Operators, IO (5).ppt
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code Contracts
 
Eta lang Beauty And The Beast
Eta lang Beauty And The Beast Eta lang Beauty And The Beast
Eta lang Beauty And The Beast
 
Debugging and Profiling C++ Template Metaprograms
Debugging and Profiling C++ Template MetaprogramsDebugging and Profiling C++ Template Metaprograms
Debugging and Profiling C++ Template Metaprograms
 
Runtime Code Generation and Data Management for Heterogeneous Computing in Java
Runtime Code Generation and Data Management for Heterogeneous Computing in JavaRuntime Code Generation and Data Management for Heterogeneous Computing in Java
Runtime Code Generation and Data Management for Heterogeneous Computing in Java
 

More from corehard_by

C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
corehard_by
 
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
corehard_by
 
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений ОхотниковC++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
corehard_by
 
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр ТитовC++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
corehard_by
 
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
corehard_by
 
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья ШишковC++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
corehard_by
 
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
corehard_by
 
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
corehard_by
 
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
corehard_by
 
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
corehard_by
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
corehard_by
 
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
corehard_by
 
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел ФилоновC++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
corehard_by
 
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan ČukićC++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
corehard_by
 
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia KazakovaC++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
corehard_by
 
C++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
C++ CoreHard Autumn 2018. Полезный constexpr - Антон ПолухинC++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
C++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
corehard_by
 
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
corehard_by
 
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
corehard_by
 
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
corehard_by
 
Автоматизируй это. Кирилл Тихонов ➠ CoreHard Autumn 2019
Автоматизируй это. Кирилл Тихонов ➠  CoreHard Autumn 2019Автоматизируй это. Кирилл Тихонов ➠  CoreHard Autumn 2019
Автоматизируй это. Кирилл Тихонов ➠ CoreHard Autumn 2019
corehard_by
 

More from corehard_by (20)

C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
 
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
C++ CoreHard Autumn 2018. Что должен знать каждый C++ программист или Как про...
 
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений ОхотниковC++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
C++ CoreHard Autumn 2018. Actors vs CSP vs Tasks vs ... - Евгений Охотников
 
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр ТитовC++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
C++ CoreHard Autumn 2018. Знай свое "железо": иерархия памяти - Александр Титов
 
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
C++ CoreHard Autumn 2018. Информационная безопасность и разработка ПО - Евген...
 
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья ШишковC++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
C++ CoreHard Autumn 2018. Заглядываем под капот «Поясов по C++» - Илья Шишков
 
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
C++ CoreHard Autumn 2018. Ускорение сборки C++ проектов, способы и последстви...
 
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
C++ CoreHard Autumn 2018. Метаклассы: воплощаем мечты в реальность - Сергей С...
 
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
C++ CoreHard Autumn 2018. Что не умеет оптимизировать компилятор - Александр ...
 
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
C++ CoreHard Autumn 2018. Кодогенерация C++ кроссплатформенно. Продолжение - ...
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
 
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
C++ CoreHard Autumn 2018. Обработка списков на C++ в функциональном стиле - В...
 
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел ФилоновC++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
 
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan ČukićC++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
C++ CoreHard Autumn 2018. Asynchronous programming with ranges - Ivan Čukić
 
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia KazakovaC++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
C++ CoreHard Autumn 2018. Debug C++ Without Running - Anastasia Kazakova
 
C++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
C++ CoreHard Autumn 2018. Полезный constexpr - Антон ПолухинC++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
C++ CoreHard Autumn 2018. Полезный constexpr - Антон Полухин
 
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
 
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
Исключительная модель памяти. Алексей Ткаченко ➠ CoreHard Autumn 2019
 
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
 
Автоматизируй это. Кирилл Тихонов ➠ CoreHard Autumn 2019
Автоматизируй это. Кирилл Тихонов ➠  CoreHard Autumn 2019Автоматизируй это. Кирилл Тихонов ➠  CoreHard Autumn 2019
Автоматизируй это. Кирилл Тихонов ➠ CoreHard Autumn 2019
 

Recently uploaded

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

C++17 now

  • 3. 2 C++ COREHARD SPRING 2017 // STANDARDIZATION IGOR SADCHENKO // C++ COREHARD // 13.05.17 CURRENT STATUS
  • 4. 3 C++ COREHARD SPRING 2017 // STANDARDIZATION IGOR SADCHENKO // C++ COREHARD // 13.05.17
  • 5. 4 C++ COREHARD SPRING 2017 // STANDARDIZATION IGOR SADCHENKO // C++ COREHARD // 13.05.17 WG21 C++ Russia
  • 7. 6 C++ COREHARD SPRING 2017 // C++17 COMPILER SUPPORT IGOR SADCHENKO // C++ COREHARD // 13.05.17
  • 8. 7 C++ COREHARD SPRING 2017 // СТАТУС ПОДДЕРЖКИ СТАНДАРТА С++17 IGOR SADCHENKO // C++ COREHARD // 13.05.17
  • 9. 8 C++ COREHARD SPRING 2017 // СТАТУС ПОДДЕРЖКИ СТАНДАРТА С++17 IGOR SADCHENKO // C++ COREHARD // 13.05.17
  • 11. 10 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 NEW AUTO RULES FOR DIRECT-LIST-INITIALIZATION(N3922) GCC: 5.0 Clang: 3.8 MSVS: 14.0 direct list initialization: T object {arg1, arg2, ...}; copy list initialization: T object = {arg1, arg2, ...}; auto a = { 42 }; // std::initializer_list<int> auto b { 42 }; // now int, before was std::initializer_list<int> auto c = { 1, 2 }; // std::initializer_list<int> auto d { 1, 2 }; // ill-formed, too many elements auto e { 1, 2.0}; // ill-formed, different type
  • 12. 11 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STATIC_ASSERT WITH NO MESSAGE(N3928) GCC: 6.0 Clang: 2.5 MSVS: 15.0 static_assert-declaration: static_assert (constant-expression) ; static_assert (constant-expression, string-literal) ; static_assert(foo > bar); ... static_assert(foo != bar);
  • 13. 12 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 TYPENAME IN A TEMPLATE TEMPLATE PARAMETER(N4051) GCC: 5.0 Clang: 3.5 MSVS: 14.0 template<typename T> struct A {}; template<typename T> using B = int; template<template<typename> class X> struct C {}; C<A> ca; // ok C<B> cb; // ok, not a class template template<template<typename> typename X> struct D; // was error
  • 14. 13 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 REMOVING TRIGRAPHS(N4086) GCC: 5.1 Clang: 3.5 MSVS: 14.0 Removes ??=, ??(, ??>, etc But we have digraph ??=include <iostream> /* # */ int main() ??< /* { */ char n??(??) = "Hello CoreHard_"; /* [ and ] */ n??(14??) = '0' + (??-0 ??' 1 ??! 2); /* ~, ^ and | */ std::cout << n << "??/n"; /* ??/ = */ return 0; ??>
  • 15. 14 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 NESTED NAMESPACE DEFINITION(N4230) GCC: 6.0 Clang: 3.6 MSVS: 14.3 Allows to write: namespace A::B::C { // some code } Rather than: namespace A { namespace B { namespace C { // some code } } }
  • 16. 15 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 NESTED NAMESPACE DEFINITION(N4230) GCC: 6.0 Clang: 3.6 MSVS: 14.3 Allows to write: namespace A::B::C { // some code } Rather than: namespace A { namespace B { namespace C { // some code } } } namespace A::B::C::D { namespace A::B::C::D { namespace A::B::C::D { namespace A::B::C::D { // some code } } } }
  • 17. 16 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 ATTRIBUTES FOR NAMESPACES AND ENUMERATORS(N4266) GCC: 4.9(ns)/6.0(enum) Clang: 3.4 MSVS: 14.0(no enum) enum E { foo = 0, foobar[[deprecated]] = foo }; E e = foobar; // warning namespace[[deprecated]] legacy{ void func() {} } legacy::func(); // warning, error in msvs14.3)
  • 18. 17 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 U8 CHARACTER LITERALS(N4267) GCC: 6.0 Clang: 3.6 MSVS: 14.0 UTF-8 character literal, e.g. u8'a'. Such literal has type char and the value equal to ISO 10646 code point value of c-char, provided that the code point value is representable with a single UTF-8 code unit. If c-char is not in Basic Latin or C0 Controls Unicode block, the program is ill-formed. The compiler will report errors if character cannot fit inside u8 ASCII range. char c = u8'Ё'; // too many characters in constant
  • 19. 18 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 ALLOW CONSTANT EVALUATION FOR ALL NON-TYPE TEMPLATE ARGUMENTS(N4268) GCC: 6.0 Clang: 3.6 MSVS:no template<int *p> struct A {}; int n; A<&n> a; // ok constexpr int *p() { return &n; } A<p()> b; // error before C++17
  • 20. 19 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 FOLD EXPRESSIONS(N4295) GCC: 6.0 Clang: 3.6 MSVS: no Reduces (folds) a parameter pack over a binary operator. (pack op ...) // unary right fold (... op pack) // unary left fold (pack op ... op init) // binary right fold (init op ... op pack) // binary left fold Explanation: 1) Unary right fold (E op ...) becomes E1 op (... op (EN-1 op EN)) 2) Unary left fold (... op E) becomes ((E1 op E2) op ...) op EN 3) Binary right fold (E op ... op I) becomes E1 op (... op (EN−1 op (EN op I))) 4) Binary left fold (I op ... op E) becomes (((I op E1) op E2) op ...) op EN C++17 support 32 binary operators in fold expressions
  • 21. 20 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 FOLD EXPRESSIONS(N4295) GCC: 6.0 Clang: 3.6 MSVS: no Allows to write compact code with variadic templates without using explicit recursion. C++17 support 32 binary operators in fold expressions. Before: Now: bool all() { return true; } template<typename T, typename ...Args> bool all(T t, Args ... args) { return t && all(args...); } template<typename... Args> bool all(Args... args) { return (... && args); }
  • 22. 21 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 UNARY FOLD EXPRESSIONS AND EMPTY PARAMETER PACKS(P0036R0) GCC: 6.0 Clang: 3.9 MSVS: no When a unary fold is used with a pack expansion of length zero, only the following operators are allowed: 1) Logical AND (&&). The value for the empty pack is true 2) Logical OR (||). The value for the empty pack is false 3) The comma operator (,). The value for the empty pack is void() For any operator not listed above, an unary fold expression with an empty parameter pack is ill-formed.
  • 23. 22 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 REMOVING Remove deprecated use of the register keyword(P0001R1) GCC: 7.0 Clang: 3.8 MSVS: no Remove deprecated operator++(bool)(P0002R1) GCC: 7.0 Clang: 3.8 MSVS: no Removing deprecated exception specifications from C++17(P0003R5) GCC: 7.0 Clang: 4.0 MSVS: no Removal of some deprecated types and functions, including std::auto_ptr, std::random_shuffle, and old function adaptors(N4190)
  • 24. 23 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 MAKE EXCEPTION SPECIFICATIONS PART OF THE TYPE SYSTEM(P0012R1) GCC: 7.0 Clang: 4.0 MSVS: no Until C++17 exception specifications for a function didn’t belong to the type of the function, but it will be part of it. void(*pf)(); void(**ppf)() noexcept = &pf; // error: cannot convert to pointer noexcept function struct S { typedef void(*pf)(); operator pf(); }; void(*q)() noexcept = S(); // error: cannot convert to pointer noexcept function
  • 25. 24 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 AGGREGATE INITIALIZATION OF CLASSES WITH BASE CLASSES(P0017R1) GCC: 7.0 Clang: 3.9 MSVS: no An aggregate is an array or a class with: * no user-provided constructors (including those inherited from a base class), * no private or protected non-static data members, * no virtual functions, and * no virtual, private or protected base classes struct Base { int a1, a2; }; struct Derived : Base { int b1; }; Derived d1{ { 1, 2 }, 3 }; // full explicit initialization Derived d2{ {}, 1 }; // the base is value initialized
  • 26. 25 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 LAMBDA CAPTURE OF *THIS(P0018R3) GCC: 7.0 Clang: 3.9 MSVS: no Capturing this in a lambda's environment was previously reference-only. *this (C++17) will now make a copy of the current object, while this (C++11) continues to capture by reference. struct Foo { int value{ 25 }; void test() { auto getValueCopy = [*this] { return value; }; auto getValueRef = [this] { return value; }; value = 27 getValueCopy(); // 25 getValueRef(); // 27 } };
  • 27. 26 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 __HAS_INCLUDE IN PREPROCESSOR CONDITIONALS(P0061R1) GCC: 5.0 Clang: 5.0 MSVS: no This feature allows a C++ program to directly, reliably and portably determine whether or not a library header is available for inclusion. #if __has_include(<string_view>) #include <string_view> #define has_string_view 1 #elif __has_include(<experimental/string_view>) #include <experimental/string_view> #define has_string_view 1 #define experimental_string_view 1 #else #define has_string_view 0 #endif
  • 28. 27 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 TEMPLATE ARGUMENT DEDUCTION FOR CLASS TEMPLATES(P0091R3) GCC: 7.0 Clang: no MSVS: no Before C++17, template deduction worked for functions but not for classes. std::make_pair("aaa"s, 111); In C++17 template class constructors can deduce type parameters. std::pair("aaa"s, 111);
  • 29. 28 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 TEMPLATE ARGUMENT DEDUCTION FOR CLASS TEMPLATES(P0091R3) GCC: 7.0 Clang: no MSVS: no Before C++17, template deduction worked for functions but not for classes. std::make_pair("aaa"s, 111); In C++17 template class constructors can deduce type parameters. std::pair("aaa"s, 111); std::tuple( [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, [](){}, );
  • 30. 29 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 NON-TYPE TEMPLATE PARAMETERS WITH AUTO TYPE(P0127R2) GCC: 7.0 Clang: 4.0 MSVS: no Automatically deduce type on non-type template parameters. template <auto value> void f() { } f<10>(); // deduces int
  • 31. 30 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 CONSTEXPR LAMBDA EXPRESSIONS(P0170R1) GCC: 7.0 Clang: no MSVS: no Compile-time lambdas using constexpr. auto identity = [](int n) constexpr { return n; }; static_assert(identity(123) == 123); constexpr auto add = [](int x, int y) { auto L = [=] { return x; }; auto R = [=] { return y; }; return [=] { return L() + R(); }; }; static_assert(add(1, 2)() == 3); constexpr int addOne(int n) { return [n] { return n + 1; }(); } static_assert(addOne(1) == 2);
  • 32. 31 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 ATTRIBUTES GCC: 7.0 Clang: 3.9 MSVS: no [[fallthrough]] attribute (P0188R1) [[nodiscard]] attribute(P0189R1) [[maybe_unused]] attribute Ignore unknown attributes(P0283R2) Using attribute namespaces without repetition(P0028R4)
  • 33. 32 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 PACK EXPANSIONS IN USING-DECLARATIONS(P0195R2) GCC: 7.0 Clang: 4.0 MSVS: no Allows you to inject names with using-declarations from all types in a parameter pack. template <typename T, typename... Ts> struct Overloader : T, Overloader<Ts...> { using T::operator(); using Overloader<Ts...>::operator(); // […] until }; template <typename T> struct Overloader<T> : T { using T::operator(); }; template <typename... Ts> struct Overloader : Ts... { using Ts::operator()...; // […] С++17 };
  • 34. 33 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 DECOMPOSITION DECLARATIONS(P0217R3) GCC: 7.0 Clang: 4.0 MSVS: no For example: std::tie(a, b, c) = tuple; // a, b, c need to be declared first std::array<T, 3> f(); std::tie(x, y, z) = f(); // INVALID. Now we can write: auto [a, b, c] = tuple; auto [a, b, c] = f(); Such expressions also work on structs, pairs, and arrays.
  • 35. 34 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 INIT-STATEMENTS FOR IF AND SWITCH(P0305R1) GCC: 7.0 Clang: 3.9 MSVS: no New versions of the if and switch statements for C++: if (init; condition) and switch (init; condition). Now you can write: if (auto val = GetValue(); condition(val)) // on success else // on false...
  • 36. 35 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 INLINE VARIABLES(P0386R2) GCC: 7.0 Clang: 3.9 MSVS: no A variable declared inline has the same semantics as a function declared inline: it can be defined, identically, in multiple translation units, must be defined in every translation unit in which it is used, and the behavior of the program is as if there is exactly one variable. struct Foo { static const int sValue; }; inline int const Foo::sValue = 777; Or: struct Foo { inline static const int sValue = 777; };
  • 37. 36 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STD::UNCAUGHT_EXCEPTIONS() (N4259) GCC: 6.0 Clang: 3.7 MSVS: 14.0 The function returns the number of uncaught exception objects in the current thread. A type that wants to know whether its destructor is being run to unwind this object can query uncaught_exceptions in its constructor and store the result, then query uncaught_exceptions again in its destructor; if the result is different, then this destructor is being invoked as part of stack unwinding due to a new exception that was thrown later than the object’s construction
  • 38. 37 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 CONSTEXPR IF-STATEMENTS(P0292R2) GCC: 7.0 Clang: 3.9 MSVS: no if constexpr(cond) statement1; // Discarded if cond is false else statement2; // Discarded if cond is true
  • 39. 38 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STD::VARIANT The class template std::variant represents a type-safe union. An instance of std::variant at any given time holds a value of one of its alternative types (it's also possible for it to be valueless). std::variant<int, double> v{ 12 }; std::get<int>(v); // == 12 std::get<0>(v); // == 12 v = 12.0; std::get<double>(v); // == 12.0 std::get<1>(v); // == 12.0
  • 40. 39 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STD::OPTIONAL The class template std::optional manages an optional contained value, i.e. a value that may or may not be present. A common use case for optional is the return value of a function that may fail. std::optional<std::string> create(bool b) { if (b) return "Godzilla"; else return {}; } create(false).value_or("empty"); // == "empty" create(true).value(); // == "Godzilla" // optional-returning factory functions are usable as conditions of while and if if (auto str = create(true)) { // ... }
  • 41. 40 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STRING_VIEW The class template basic_string_view describes an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero. A typical implementation holds only two members: a pointer to constant CharT and a size. // Regular strings. std::string_view cppstr{ "foo" }; // Wide strings. std::wstring_view wcstr_v{ L"baz" }; // Character arrays. char array[3] = { 'b', 'a', 'r' }; std::string_view array_v(array, sizeof array); std::string str{ " trim me" }; std::string_view v{ str }; v.remove_prefix(std::min(v.find_first_not_of(" "), v.size())); str; // == " trim me" v; // == "trim me"
  • 42. 41 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STRING_VIEW Problem class foo { std::string str_; public: std::string_view get_str() const { // substr starting at index 1 till the end return str_.substr(1u); } };
  • 43. 42 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 STRING_VIEW Solution class foo { std::string str_; public: std::string_view get_str() const { // substr starting at index 1 till the end return std::string_view(str_).substr(1u); } };
  • 44. 43 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 FILE_SYSTEM GCC: 6.0 Clang: 3.9 MSVS: 14.0 The Filesystem library provides facilities for performing operations on file systems and their components, such as paths, regular files, and directories. The filesystem library was originally developed as boost.filesystem Structure: path - represents a path filesystem_error - an exception thrown on file system errors directory_entry - a directory entry directory_iterator - an iterator to the contents of the directory recursive_directory_iterator - an iterator to the contents of a directory and its subdirectories file_status - represents file type and permissions space_info - information about free and available space on the filesystem file_type - the type of a file
  • 45. 44 C++ COREHARD SPRING 2017 // IGOR SADCHENKO // C++ COREHARD // 13.05.17 ETC std::any std::byte std:invoke std::is_callable std::apply parallels algorithm improved math
  • 47. 46 C++ COREHARD SPRING 2017 // SUMMARY IGOR SADCHENKO // C++ COREHARD // 13.05.17 CONCLUSION • New standards are almost supported by compilers by the time of release • You can help make new C++ better • C++ gets harder • It is С++!
  • 48. 47 C++ COREHARD SPRING 2017 // SUMMARY IGOR SADCHENKO // C++ COREHARD // 13.05.17 LINKS Last draft http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4618.pdf Current status of C++ standardization https://isocpp.org/std/status https://www.iso.org/standard/68564.html WG21 C++ Russia https://stdcpp.ru/ C++17 compiler support http://en.cppreference.com/w/cpp/compiler_support https://gcc.gnu.org/projects/cxx-status.html#cxx1z http://clang.llvm.org/cxx_status.html#cxx17 https://blogs.msdn.microsoft.com/vcblog/2017/05/10/c17-features-in-vs-2017-3/ C++17 Features overview http://www.bfilipek.com/2017/01/cpp17features.html https://github.com/AnthonyCalandra/modern-cpp-features#stdstring_view
  • 49. THANK YOU FOR YOUR ATTENTION!
  • 50. IGOR SADCHENKO software developer +375 33 642 92 91 https://www.facebook.com/WargamingMinsk ANY QUESTIONS? igor.sadchenko@gmail.com wargaming.com https://www.linkedin.com/company/wargaming-net