Fatal is a library for fast prototyping software in modern C++. It provides facilities to enhance the expressive power of C++. The library is heavily based on template meta-programming, while keeping the complexity under-the-hood.
C++ Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo - [break] changing `transform` API to accept transforms as types, sim… Nov 4, 2016
docs bulk update (2014/09/28) Oct 2, 2014
fatal Fix various includes and dependencies Aug 11, 2018
lesson Fix some violations of the 80-column ruler Aug 29, 2017
.gitignore adding gdb history file to gitignore Apr 8, 2015
.travis.yml Switch Travis CI builds to Ubuntu Trusty Sep 18, 2017
CONTRIBUTING.md initial import Sep 9, 2014
LICENSE - updating copyright year Jul 16, 2016
PATENTS - updating PATENTS file (see http://fb.me/patents2) Apr 13, 2015
README.md Adjust the list of supported compilers in the README Sep 12, 2017
build.sh - excluding benchmarks from contbuild Aug 5, 2016
compile.sh - fixing build error on continuous integration Sep 12, 2017
compilers.conf - fixing build error on continuous integration Sep 12, 2017
contbuild.sh - enabling building of benchmarks as part of contbuild Nov 4, 2016
demo.sh - properly determining std flag in `demo.h` Sep 1, 2016
full_compile.sh - adding full_compile.sh helper script Jul 7, 2016
full_test.sh - adding script to help with running a single test on all supported c… Jun 2, 2016
learn.sh - organizing helper scripts May 3, 2016
local_contbuild.sh - enabling building of benchmarks as part of contbuild Nov 4, 2016
logo.png - adding logo image Aug 14, 2015
profile.sh - cleaning up contbuild scripts Jun 2, 2016
quick-validate.sh Suppress lint in old files Jan 29, 2018
scripts.inc more efficient way to clear tmux buffer for better scrolling experience Aug 5, 2017
smoke_build.sh - adding `demo` directory to `smoke_build.sh` Sep 29, 2016
test.sh - cleaning up contbuild scripts Jun 2, 2016
validate.sh Suppress lint in old files Jan 29, 2018

README.md

Facebook Template Library Build Status

Fatal (Facebook Template Library) is a library for fast prototyping software in modern C++.

It provides facilities heavily based on template meta-programming, while keeping most of the complexity under-the-hood, to enhance the expressive power of C++.

Fatal also provides lessons on how to write meta-programs, as well as on how to make the best use of the library, starting at beginner levels.

The goal is make its benefits available to a wider audience other than just hard-core library writers.

Documentation and Examples

A learn-by-example guide is available under the lesson/ directory.

Demo programs are also available under the demo/ directory.

Extensive documentation with examples can be found inline in the source header files.

Building Fatal

Fatal is a header only library, therefore no building is required.

Requirements

A compliant C++11 compiler. Currently tested under Clang {3.5, 3.6, 3.7, 3.8, 3.9, 5.0} and GCC {4.9, 5, 6}.

There are no other external dependencies.

Links

Discussions group on Facebook

Try it online using Metashell.

Philosophy

Fatal moves fast, therefore it uses the latest and greatest in C++ standards. It aims to adopt new standard features as soon as they're officially out, as long as they provide benefits like performance, productivity and usability improvements.

Stable versions are tagged and can be found under the list of releases. Look out for breaking changes whenever a new release is made (see below) - they should be listed on the release notes.

The master branch is considered the development version of the library and experiences frequent updates. If you want the bleeding edge, that's the branch for you. Be advised, though, that it is under heavy development: breaking changes might be introduced without notice. They'll be tagged with the string [break] in the first line of the commit message.

Installation

There's no need to install Fatal, as long as you add its base directory to the include directories list.

For Clang and GCC, it suffices to either:

  • use the -I path/to/fatal flag
  • set the environment variable CPLUS_INCLUDE_PATH=path/to/fatal

Building Benchmarks and Unit Tests

$ clang++ -Wall -Werror -O2 -std=c++11 -I path/to/fatal \
  -o path/to/output/binary path/to/test/or/benchmark.cpp \

or

$ g++ -Wall -Werror -O2 -std=c++11 -I path/to/fatal \
  -o path/to/output/binary path/to/test/or/benchmark.cpp \

Join the Fatal community

See the CONTRIBUTING file for how to help out.

License

Fatal is BSD-licensed. We also provide an additional patent grant.