ctemplate
« Back to VersTracker
Description:
Template language for C++
Type: Formula  |  Latest Version: 2.4@1  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ templates code-generation text-processing developer-tools
Install: brew install ctemplate
About:
CTemplate is a fast and lightweight template language and code generation tool designed for C++. It separates presentation from logic by using simple text templates with placeholders and directives, enabling clean generation of HTML, XML, or configuration files. Its primary value is in creating maintainable, high-performance output without embedding complex logic directly in the templates.
Key Features:
  • Fast, deterministic output generation optimized for C++
  • Separation of concerns: clean templates without embedded logic
  • Supports template inheritance, partials, and conditionals
  • Command-line tool for precompiling templates into C++ code
Use Cases:
  • Generating high-performance HTML for web servers
  • Creating configuration files from structured data
  • Code generation for boilerplate C++ structures
Alternatives:
  • jinja2 – Python-based, more feature-rich but requires a runtime environment
  • mustache – Language-agnostic logic-less templates, often slower than CTemplate in C++ contexts
License: BSD-3-Clause
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, arm64_monterey, arm64_big_sur, sonoma, ventura, monterey, big_sur, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit