Welcome

SweSTHLM1

StockholmCpp

event flyer0x3C

Today’s sponsor

 

 

sv spe nylogga

C++ news

 

C++ news

 

February mailing list
  • P4019R0 constant_assert, Jonas Persson

  • P4024R0 Guidance on Building Consensus and Converging Proposals

  • P5000R0 Direction for ISO C++29

  • P3874R1 Should C++ be a memory-safe language?

  • …​ and much more

TK611/AG09

 

TK611/AG09

 

  • Regulars

  • Paper club week 11

TK611/AG09

 

  • Group did shrink

 

Want to participate on WG21 work?
That is possible!
Contact me

SwedenCpp News

SwedenCpp News

 

X and Bsky get a daily reminder to visit us

 

SwedenCpp.se ⇒ The C++ content hub!

SwedenCpp News

 

StockholmCpp Planning 2026
  • Mid/Late April

  • End of Mai/Begin of June

Call for Papers!

 

needyou

Submit your ideas and suggestions

Call for Papers!

You know how it works

whowants

Quiz time

JetBrainsLicense

Quiz time

 

int main() {
  std::vector<int> v = {0, 1, 2, 0, 1, 0, 4};
  std::print("{}\n", v);
  // remove all 0 elements
  auto new_end = std::remove(v.begin(), v.end(), 0);
  v.erase(new_end, v.end());
  std::print("{}\n", v);
}
// [0, 1, 2, 0, 1, 0, 4]
// [1, 2, 1, 4]

What idiom is this?

Quiz time

 

int main() {
  std::vector<int> v = {0, 1, 2, 0, 1, 0, 4};
  std::print("{}\n", v);
  // remove all 0 elements

  ________________;
  std::print("{}\n", v);
}
// [0, 1, 2, 0, 1, 0, 4]
// [1, 2, 1, 4]

How to make that nice?

Quiz time

 

int main() {
  std::vector<int> v = {0, 1, 2, 0, 1, 0, 4};
  std::print("{}\n", v);
  // remove all 0 elements

  std::erase(v, 0);
  std::print("{}\n", v);
}
// [0, 1, 2, 0, 1, 0, 4]
// [1, 2, 1, 4]

std::erase and std::erase_if
since C++20

Today’s program

 

  • Daniel: Seamless Static Analysis with Cppcheck

  • 🍹 🍕 Mingle 🍕 🍻

  • Kristian: Casual, an open-source SOA platform

Väl mött!