Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 4a3b4f1462616276028e9496e00a4837750081f2
Page Name:Cxxomfort
Date: 2017-12-20 17:39:49
Original User: luismachuca
Parent: 8dc6ac17e398251e378e2373d3d12c00a5fdbf57 (diff)
Next c85c97e9c45cd83e64c28886826482cb3732c1ac
Content
Comfort, n. [2]

A consolation; something relieving suffering or worry.

"We still have the spare tire? That's a comfort at least."

(Wiktionary)

Cxxomfort is a small, header-only library that backports to C++03 or C++11 some of the nifty C++11 and later goodies, including some proposals still in the works. I wrote it to facilitate my working with the evolving C++ standard as I was getting back into the language. It is intended to reduce the amount and stress of code rewrite while at the same time assisting in backwards and forwards portability.

Current version: 0.52 (2017-07)

Installation

Features Examples (external) Issues

Installation and Configuration

Quick and dirty:

Install the Fossil software then run:

fossil clone http://ryan.gulix.cl/fossil.cgi/cxxomfort cxxomfort.fossil
fossil open cxxomfort.fossil

After that's done, you can in general just add the resulting directory path to compiler #include paths; then write some code.

For specifics:

Usage

Using this library is as simple as writing C++ code. Include the cxxomfort header in your code:

#include <cxxomfort/cxxomfort.hpp>
// or #include <cxxomfort/base.hpp> if you only plan to use the basic features

…and start using the various features that are made available, including but not limited in C++03 mode to nullptr, static_assert, iterator helpers and metaprogramming helpers, and alignof where available, and in C++11 mode improvements to functional and tuple.

If you are interested in usage examples an amount of examples is available in the cxxomfort-examples Github repository (notabug mirror).

You can include only cxxomfort/base.hpp in library code if you only need the base subset of cxxomfort features, without TR1-related utilities or any other sort of advanced features. Features for more information.

There are also some extra features that are included and activated explicitly, such as scoped enumeration emulation and a handful of proposals that haven't been verified yet into later Standards, such as optional. See Features/Extras for more information.

Meta

For a list of frequently asked questions read the FAQ.

The purpose of this library is to ease writing natural-feeling, forwards-compatible code once. As such, some design decisions are made that might conflict with conflict with certain pedantic "coding styles". For a quick, uncomprehensive check read Rationale.

The library does not aim to be perfect - that way lies madness, suffering, and suffering leads to anger, and anger leads to overused lines from movies. Instead, it aims to be "good enough" for the backports to be usable as far back as possible Standards-wise.

For a list features included in this library and what are the Standard Proposals they come from check Implementation Status.

Credits to the various solutions in Credits.

License information in the included LICENSE.txt file or in License.

Q&A at luis[dot]machuca[at]gmail[dot]com or file a request in the ticket system