All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Lisp-Style C++ Template Metaprogramming Library (lmp) - Experimental GitHub Project

By

mistivia

2mo ago· 10 min readenCode

Summary

A GitHub repository showcasing a Lisp-style C++ template metaprogramming library called 'lmp'. The project implements functional programming concepts using C++ templates as an esoteric programming language, treating template metaprogramming as a fun experiment rather than production code. It demonstrates basic list operations like reversing lists and accessing elements through compile-time static assertions, requiring C++11. The author explicitly warns that it's not suitable for production due to performance issues and template expansion depth limitations.

Key quotes

· 5 pulled
C++ template meta programming in a Lisp style.
This is not something you would use in production. It's super slow and easily hit the max depth of template expansion.
It's more like treating C++ template as an esolang, and create a 'Lisp' on it just for fun.
C++11 is needed.
See test.cc for examples.
Snippet from the RSS feed
lisp-style c++ template meta programming. Contribute to mistivia/lmp development by creating an account on GitHub.

You might also wanna read