Html Plus Plus

screenshot of Html Plus Plus

Write HTML using C++ templates

Overview

HTML++ is a library that allows you to write HTML using C++ templates. It represents the HTML document as a single, deeply-nested type which is type-checked by the compiler. If compilation succeeds, you will have a program that prints a properly-indented HTML document to the standard output when run.

Features

  • Type-checked HTML: The library uses C++ templates to represent the HTML document as a type, allowing for type checking of the nested structure of the HTML elements.
  • C++20 Compatibility: HTML++ requires C++20 and works with GCC 9.2.0 with -std=c++2a enabled, ensuring compatibility with the latest version of the language.
  • Easy Installation: Simply include the "html++.h" file, and that's all you need to use the library.

Summary

HTML++ is a library that allows you to write HTML using C++ templates. It leverages C++20 features, such as string literals as non-type template parameters, to closely imitate the structure and syntax of HTML tags. The library provides type-checking of the HTML structure using templates and allows for easy installation by including a single "html++.h" file.