Fluent::Programmer

    Home Blog About
  • Home
  • Blog
  • About
  • c++
  • beautiful-code-series
  • linux
  • algorithms
  • assembly-language
  • c-programming
  • network-programming

C++

Fluent Programmer wrote

Beautiful code #4 - std::any_of, std::none_of, std::all_of - efficient C++20 featureπŸ‘‹

std::any_of, std::none_of and std::all_of is a C++20 feature that helps efficiently check for basic conditions in the data structures. This is very optimal because of early termination once some fact is found and the algorithm don’t have to iterate more to further prove anything before returning the result.

Fluent Programmer wrote

Beautiful code #3 - [[no_unique_address]] - sophisticated and simple C++20 featureπŸ‘‹

[[no_unique_address]] is a C++ 20 feature that helps in saving memory while declaring an empty struct or class and creating object for it in some other place.

Fluent Programmer wrote

Beautiful code #2 - enable_if_t and template inside a template code πŸ‘‹

In this short article, I have posted a code snippet that uses enable_if_t to handle SFINAE and also showed how to use a template inside a template.

Fluent Programmer wrote

Beautiful code #1 - Using define, templates and r-value reference πŸ‘‹

In this short article, I have posted an example that does the reinterpret_cast on an integer and convert it to char pointer and then the value pointed by the char pointer is converted to r-value reference all in a macro.

Fluent Programmer wrote

Enumerations and Class Enumerations in C++ πŸ‘‹

Enumerations are always fun to use in C++ programs. C++ core guidelines define eight different rules to define the enumerations. And also, C++11 introduced the scoped enumerations also called as class enumerations. Scoped enums also have few advantages over plain enums which are also covered in this article.

Fluent Programmer wrote

Function Templates in C++ πŸ‘‹

Overloaded functions have the exact same code but the type is different. It seems an unnecessary overhead to write the same code again and again and in a long time it adds up to the maintenance cost of the project. To write code once and use it multiple times we use function templates. A function template is itself is not a definition of a function; it is a blueprint for defining a family of functions.

Fluent Programmer wrote

Volatile Keyword in C and C++ πŸ‘‹

Quoting from the C++ Standard ($7.1.5.1/8):

[..] volatile is a hint to the implementation to avoid aggressive optimization involving the object because the value of the object might be changed by means undetectable by an implementation.[…]" lead: “Quoting from the C++ Standard ($7.1.5.1/8)

[..] volatile is a hint to the implementation to avoid aggressive optimization involving the object because the value of the object might be changed by means undetectable by an implementation.[…]

  • ««
  • «
  • 1
  • 2
  • »
  • »»
  • C++
  • Systems & Network
  • C programming
  • Beautiful code
  • Design patterns
  • Linux
  • Open Source
  • Algorithms
  • Data Structures
  • System design
  • Distributed systems
  • Kernel
  • Assembly language
  • Hardware
  • Ultra Low Latency
  • Inspiration

Unhealthy love with dark corners of C++

Founded by an engineer to help engineers. 2021–2023.

Fluentprogrammer.com is a brand name managed by Abyan, Inc.

  • About us
  • Privacy policy