• Stars
    star
    714
  • Rank 63,413 (Top 2 %)
  • Language
    TeX
  • License
    Other
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Standard Algorithms in C++.

Book: A Complete Guide to Standard C++ Algorithms

This repository contains the LaTeX source and C++ code samples for the book "A Complete Guide to Standard C++ Algorithms".

Latest PDF release (v1.0.1)

Book Cover

Changelog

  • 1.0.1 Small (mostly) formatting fixes.
  • 1.0.0 Content complete release with Compiler Explorer links.
  • 0.3.0 New chapter with ADL information and formatting cleanup.
  • 0.2.1 Fixed page numbering issue, small text changes.
  • 0.2.0 Added chapter covering C++20 ranges and views.
  • 0.1.1 Added index and a cover page, small text changes.
  • 0.1.0 First pre-release

Building from sources

The repository is configured with VSCode devcontainer support.

Make sure that you have VSCode and Docker installed, then simply open the repository in VSCode. You will be prompted to reopen the project in a docker image.

VSCode is configured to use the LaTeX Workshop extension. To build the PDF simply press CTRL+ALT+B or select LaTeX Workshop: Build LaTeX Project from the command palette. Note that due to the high number of code examples, the build does take a while. The resulting PDF will be in the build folder.

Code samples

Most code files have wrapping main files that exercise both the build and also contain assert expressions that verify correctness of the code.

The verify.sh shell script will build all (except for a few that don't compile with GCC 11) examples, and then run each of them to validate all asserts.

Alternative approach of building from sources

This section was provided by @wxinix. Please direct any questions to him.

TeXstudio offers an alternative solution for those who are building from sources in a virtual machine environment and are unable to use the VSCode and Docker approach. Follow the steps below (assuming the Guest OS of the virtual machine is Windows):

  • Install Anaconda and add C:\Users\YourUserName\anaconda3\Scripts to system path. Replace YourUserName with your actual user name.
  • Install TeXstudio.
  • Go to TeXstudio menu "Options -> Configure TeXstudio -> Commands -> XeLaTex", and enter the following command: xelatex.exe -synctex=1 -interaction=nonstopmode -shell-escape -aux-directory=build -output-directory=build %.tex. This command sets both the aux and output directories to ".\build".
  • Go to TeXstudio menu "Options -> Configure TeXstudio -> Build -> Meta Commands -> Default Compiler", and enter txs:///xelatex. This switches the default compiler from pdflatex to xelatex. Then, enable the checkbox "Show Advanced Options".
  • For TeXstudio menu "Options -> Configure TeXstudio -> Build -> Build Options -> PDF File", enter build. This tells the pdf previewer to look for the generated pdf file in the ".\build" directory.
  • Finally, go to "TeXstudio menu Options -> Configure TeXstudio -> Commands -> Makeindex", and enter the following command: makeindex.exe build%.idx

These steps will enable you to build from sources inside a virtual machine using TeXstudio. Keep in mind that the VSCode and Docker approach might not work in a virtual machine environment, because it requires extra set-up for nested virtulization. Ask @wxinix if you have any questions.

More Repositories

1

ces

CES - Coroutines, Epoll and Sockets
C++
38
star
2

moderncpp-aoc-2021

Modern C++ solutions for Advent of Code 2021
C++
33
star
3

daily-bite-cpp

A directory for the Daily bit(e) of C++ series of posts.
25
star
4

article-cpp20-modules

Examples and shell scripts for C++20 modules article & video.
Shell
24
star
5

moderncpp-aoc-2022

Solutions for Advent of Code 2022 using Modern C++.
C++
24
star
6

article-cpp20-coroutines

Repository with examples for the C++20 Coroutines video and article.
C++
22
star
7

simple-cpp-devenv

Template repository with a simple development environment for C++ projects using VSCode and Docker.
CMake
15
star
8

sudoku

Sudoku Solver that doesn't guess.
C++
11
star
9

modern-documentation

C
8
star
10

kontr

Automatic system for testing students homeworks - optimized from programming language courses
Perl
7
star
11

bazel-golang-minimal-example

Minimal example demonstrating the use of Bazel with Golang.
Starlark
7
star
12

screeps

AI for the Screeps MMO.
TypeScript
7
star
13

article-cpp20-concepts

Repository with examples for the C++20 Concepts video and article.
C++
7
star
14

daily-bite-course-01

Starlark
6
star
15

sudoku_ui

The UI for the sudoku solver.
C++
5
star
16

teaching

Repository with teaching materials (mostly C and C++) licensed CC BY-NC-SA 2.0
C++
5
star
17

meetingcpp22-bazel

Talk for Meeting C++ 2022: Living comfortably at HEAD with Bazel
TeX
4
star
18

streambot

Interactive Stream Bot optimized for streaming across multiple platforms.
TypeScript
4
star
19

cppcon22-talk

[CppCon 2022 talk] The Dark Corner of STL: MinMax Algorithms
TeX
4
star
20

cpp-coding-interview-companion

C++
4
star
21

HappyCerberus

3
star
22

mastodon-scheduler

Client-only mastodon post scheduler.
Vue
3
star
23

subprocess

C++ wrapper around Linux subprocess creation and control.
C++
3
star
24

streambot-obs-overlay

Vue based OBS overlay that works with the streambot.
Vue
2
star
25

happycerberus.github.io

SCSS
2
star
26

cpp-course

Dockerfile
2
star
27

article-quicksort

C++
2
star
28

article-cpp20-ranges

Repository with examples for the C++20 Ranges video and article.
C++
2
star
29

demo-cpp20-awaitable-read

Demonstration of an awaitable asynchronous read using POSIX AIO.
C++
1
star
30

Deadline-Schedule-Evaluator

Deadline based evaluator for GRID schedules
C++
1
star
31

jitgdb

Just in time debugging support for GDB.
C
1
star
32

averager

Data averaging tool. Computes running averages over discrete non-continuous data.
C++
1
star
33

cpp-course-beginners

WIP
1
star