Giter VIP home page Giter VIP logo

metaprogramming-course's Introduction

Метапрограммирование на C++

Презентации

Условия задач

Как тестировать задачи

Code style

Темы

Темы идут в произвольном порядке и не мапятся 1 к 1 на занятия. Более того, скорее всего осветить все из них за один семестр не удастся. Программа продумана не до конца и будет уточняться по ходу дела.

  1. Templates. Templateable entities, kinds, metafunctions
  2. Template debugging. Dependent false assertion, tracers, archetypes
  3. Name resolution, two-phase lookup, dependent names
  4. Type deduction. Template arguments, auto, deduction guides
  5. Perfect forwarding. Unversal references, argument forwarding, result forwarding, decltype(auto)
  6. Friends, Barton–Nackman trick
  7. Concepts, requirements
  8. Stateful metaprogramming with friends
  9. Reflection tricks. std::source_location, enum reflection, struct reflection
  10. Type lists
  11. Traits and policies
  12. Policy based design, Mixins, EBCO
  13. Polymorphism. VTables, templates, macros, link time polymorphism, CRTP, type erasure
  14. Multimethods
  15. Named template arguments trick
  16. Hierarchy generation
  17. Tuples and variants
  18. OO patterns revisited: factory, abstract factory, prototype, visitor, command, observer, strategy...
  19. Niebloids
  20. Tag invoke
  21. Ranges
  22. Macros and codegen

Полезные ссылки

refactoring.guru — сайт про паттерны и рефакторинг

Concepts and constraints — cppreference

Концепты: упрощаем реализацию классов std utility — доклад Андрея Давыдова

Метапрограммирование, щадящее компилятор — доклад Андрея Давыдова

Building Range Adaptors (part 1, part 2) — Chris Di Bella, CppCon

Move only folly::Function — Sven Over, CppCon

Inplace std::function alternative for audio processing — Tom Poole, CppCon

C++14 Reflections Without Macros, Markup nor External Tooling — Антон Полухин, CppCon

How to Hack C++ with Templates and Friends

C++ vtables — таблицы виртуальных функций в деталях

Customization Point Design in C++11 and Beyond — ниблоиды, CPO используемые в std::ranges

Template metaprogramming — бесплатные списки типов через std::ranges

tag_invoke: A general pattern for supporting customisable functions (P1895) — новый ультимативный механизм для CPO без измений в язык

[https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1985r1.pdf](Universal Template Parameters) — то, что мы очень хотим, но получим не скоро

function2 — улучшеный std::function, пример реализации vtable руками

libunifex — новый фреймворк для асинхронности в плюсах. Содержит примеры и на vtable, и на тайплисты, и на tag_invoke, и вообще на всё на свете

Building Range Adaptors — Chris Di Bella, CppCon

YOMM2 — библиотека для открытых (мульти)методов

Полезные книжки

Andrei Alexandrescu, "Modern C++ Design: Generic Programming and Design Patterns Applied" — слегка устаревшая классика

David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor, "C++ Templates: The Complete Guide (2nd ed.)" — всё, что нужно знать о шаблонах в C++17

metaprogramming-course's People

Contributors

mrkol avatar raid-7 avatar andtit2001 avatar petialetia avatar sazikov-a avatar misnikandrew avatar nikevas avatar isergeyam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.