Artifact 3ecffed3e82a4c572c2c54707eec54a3d1489f98:

Wiki page [Cxxomfort] by luismachuca 2018-08-27 15:07:15.
D 2018-08-27T15:07:15.144
L Cxxomfort
P c85c97e9c45cd83e64c28886826482cb3732c1ac
U luismachuca
W 4526
<blockquote style="font-size:85%;"><b>Comfort</b>, n. <nowiki>[2]</nowiki>

A consolation; something relieving suffering or worry. 

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

([http://en.wiktionary.org/wiki/comfort|Wiktionary])
</blockquote>

<em>Cxxomfort</em> 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.72 (2018-08)

<table border="1"><tr>
<th>Quickie Links</th><td>[#base-installation|Installation] </td><td> [Features]  </td><td> [https://github.com/lmachucab/cxxomfort-examples|Examples (external)] </td><td> [/ticket|Issues] </td>
</tr></table>

<a name="base-installation"></a>
<h2>Installation and Configuration</h2>

Quick and dirty:

Install the [https://www.fossil-scm.org/|Fossil software] then run:

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

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

For specifics:

<ul>
<li>[Installation]</li>
<li>[Configuration]</li>
<li>Getting Documentation (this wiki)
</ul>

<a name="usage"></a>
<h2>Usage</h2>

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

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

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

If you are interested in <b>usage examples</b> an amount of examples is available in <b>[https://github.com/lmachucab/cxxomfort-examples|the cxxomfort-examples Github repository]</b> (notabug mirror).

You can include only <code>cxxomfort/base.hpp</code> in library code if you only need the <b>base subset of cxxomfort features</b>, 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 <code>optional</code>. See [Features/Extras] for more information.

<ul>
<li>[BehaviourMacros]</li>
<li><b>[Features]</b> - what is backported or implemented from various C++ Standards
<ol>
    <li>[Features/Keywords] such as nullptr and static_assert</li>
    <li>[Features/IntegratedTypeTraits|Integrated type traits]</li>
    <li>[Features/rvref|Rvalue-reference emulation]</li>
</li></ol>
<li>[IndependentFeatures] specific to cxxomfort, such as extra algorithms, foreach loops, local function emulation, fixed_vector, etc... </li>
<li>[Features/Extras|Extra features] such as implementation of experimental's optional, simple ranges, etc...  </li>
<li>[Transparent Headers]</li>
</ul>

<h2>Meta</h2>

For a list of frequently asked questions read the [FAQ].

The purpose of this library is to ease writing natural-feeling, forwards-compatible code <i>once</i>. 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 <code>LICENSE.txt</code> file or in [License].

<small>Q&A at <code><nowiki>luis[dot]machuca[at]gmail[dot]com</nowiki></code> or file a request in the [http://ryan.gulix.cl/fossil.cgi/cxxomfort/ticket|ticket system]</small>


Z 33ac0add148ba8ddc236a9363800695d