File:C++ variable inline.svg

Summary

Description
Français : C'est un comic strips avec deux jeunes discutant d'une erreur de compilation C++ :
class Ne
{
  static int rd;
};

Erreur: référence indéfinie vers Ne::rd

Une personne propose rajouter inline. La seconde personne est toute étonné car cela ressemble aux fonctions inline. Et cela compile sans erreur:

class Ne
{
  static inline int rd;
};
Les variables inline est une nouvelle fonctionnalité apportée par le standard C++17.
Date
Source Own work
Author Oliver H

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#C++%20variable%20inline.svgCategory:Self-published work
Category:C++ Category:2-panel cartoons
Category:2-panel cartoons Category:C++ Category:CC-BY-SA-3.0 Category:Self-published work