Archive

Posts Tagged ‘STL’

std::tie

April 15th, 2015 No comments
struct S { A a; B b; C c; };

auto const S_fields = [](S const& obj) -> auto { return std::tie(obj.a, obj.b, obj.c); };

bool operator == (S const& lhs, S const& rhs) { return S_fields(lhs) == S_fields(rhs); }

bool operator < (S const& lhs, S const& rhs) { return S_fields(lhs) < S_fields(rhs); }

STL-containers member functions table (C++02 and C++11)

January 27th, 2013 No comments

cppreference.com: The Containers library is a generic collection of class templates and algorithms that allow programmers to easily implement common data structures like queues, lists and stacks.   There are three classes of containers — sequence containers, associative containers, and unordered associative containers — each of which is designed to support a different set of operations.

Pdf version

C9 Lectures: Core C++

July 19th, 2012 No comments

We know lots of folks are either coming back to C++, coming to C++, or have never left C++. This lecture series, in n parts, is for all of you! Only STL can make that work (novice, intermediate, and advanced all bundled together and presented in a way only STL can do.)

C9 Lectures: Stephan T. Lavavej – Core C++

Writing modern C++ code: how C++ has evolved over the years

September 19th, 2011 No comments
Many people think of C++ as the same language they experienced in college or just as “C with classes”, but the C++ language has evolved extensively over the years. In this session, we’ll cover how you can use C++ to write innovative, expressive and beautiful apps that deliver power and performance apps. Join us to see how the newly finished C++0x standard can make writing C++ as productive as many other languages.

Standard Template Library (STL) lectures

September 10th, 2010 No comments

In the following series, learn all about STL from the great Stephan T. Lavavej, Microsoft’s keeper of the STL cloth (this means he manages the partnership with the owners of STL and Microsoft, including, of course, bug fixes and enhancements to the STL that ships as part of Visual C++).

  • Part 1 (sequence containers)
  • Part 2 (associative containers)
  • Part 3 (smart pointers)
  • Part 4 (an extended example of using the STL to solve Nurikabe puzzles)
  • etc

Alexander A. Stepanov

September 6th, 2010 No comments

Alexander Alexandrovich Stepanov (Russian: Александр Александрович Степанов) (born November 16, 1950 in Moscow) is the primary designer and implementer of the C++ Standard Template Library [1], which he started to develop around 1992 while employed at HP Labs. He had earlier been working for Bell Labs close to Andrew Koenig and tried to convince Bjarne Stroustrup to introduce something like Ada Generics in C++.

Лекция «Наибольшая общая мера последние 2500 лет» (часть 1 и часть 2)
Слайды: англ и рус.

Лекция «Преобразования и их орбиты» (часть 1 и часть 2)

Elements of Programming – (November 3, 2010) Speakers Alexander Stepanov and Paul McJones give a presentation on the book titled “Elements of Programming”. They explain why they wrote and attempt to explain their book. They describe programming as a mathematical discipline and that it is extremely useful and should not be overlooked.

Stepanov’s homepage

Andrei Alexandrescu “Iterators Must Go!”

February 6th, 2010 No comments

Andrei Alexandrescu gives his keynote presentation, “Iterators Must Go!” at BoostCon 2009. Slides are available here (pdf).

Permalink

Iterators Must Go (Google Docs)

Boost compilation with Visual Studio

November 17th, 2009 No comments

build bjam

  • go to %BOOST%/tools/jam/src folder
  • run build.bat file
  • copy bjam.exe file to %BOOST%/bin folder from %BOOST%/tools/jam/src/bin.ntx86 folder

build boost

  • go to %BOOST% folder
  • compile Boost using bjam.exe:

bin\bjam.exe –build-dir=”C:\Dev\Libs\boost\build-boost” –toolset=msvc –build-type=complete stage

std::map – копирование элементов

January 14th, 2009 No comments
std::map<wstring, wstring> map1;
std::map<wstring, wstring> map2(map1);
std::map<wstring, wstring> map3(map2.begin(), map2.end());

map1.insert(map3.begin(), map3.end());
map2 = map3;
std::copy(map2.begin(), map2.end(), inserter(map1, map1.end()));