C++C++17Learn C++Syntax

What Are The Elementary String Conversions That Come With C++ 17?

In addition to many beneficial features of C++ 17, there are elementary string conversions introduced in that specification. The std::to_chars() and std::from_chars() are defined in <charconv> header to do conversions between numeric values to strings or strings to numeric values without considering locale-specific conversions. In this post, we explain the std::to_chars() and std::from_chars()…
Read more
C++C++17C++20Introduction to C++IteratorsLearn C++Syntax

What Is basic_string_view And string_view In Modern C++

C++17 had enormous changes in C++ features. One of them was basic_string_view (std::basic_string_view) which is a constant string container that can be used for multiple string declarations. The basic_string_view is a modern way of read-only text definition. It can be used by iterators and other methods of the basic_string_view class. In this post, we explain basic_string_view and its…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

What Are The CMath Mathematical Functions in Modern C++?

In C++11 and C++14, we were able to use this math.h library in C++ applications. After the C++17 standard, this library is modernized in the cmath library, and functions are declared in <cmath> header for compatibility reasons in modern C++, and the <math.h> is an optional header to support legacy code. In this post, we list most of these mathematical functions declared in the <cmath>…
Read more
C++C++14C++17C++20Learn C++Syntax

How To Use Tuple Addressing Via Type In C++14 And Beyond

The tuple ( std::tuple ) is a class template that stores the different types of elements, it also supports empty lists in modern C++. This template was introduced in C++11 and improved in C++14. In this post, we explain tuple addressing via type features that come with the C++14 standard. What is std::tuple in C++? The tuple ( std::tuple) is a class template a fixed-size collection of…
Read more