cxxomfort
rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Describes cxxomfort macros for code generation.
Cxxomfort includes a number of macros that help generating code.
For generating code for types and classes:
CXXO_DEFAULT_DEFAULT_CONSTRUCTOR() - declares a class's default constructor as =default
(or a close equivalent in pre-C++11).
CXXO_DELETED_DEFAULT_CONSTRUCTOR() - declares a class's default constructor as =delete
(or a close equivalent in pre-C++11).
CXXO_DEFAULT_COPY_CONSTRUCTOR() - declares a class's default copy constructor as =default
(or implements an alternative pre-C++11).
CXXO_DELETED_COPY_CONSTRUCTOR() - declares a class's default copy constructor as =delete
-d (or a close equivalent pre-C++11).For generating functions:
Including #include <cxxomfort/base.hpp>
(explicitly or implicitly) gives access to the following macros:
CXXO_COPYABLE_AND_MOVABLE(classname)
- declare a class as copyable and movable, native in C++11 or using move-emulation in C++03.Including #include <cxxomfort/impl/relationals.hpp>
gives access to the following feature:
CXXO_GENERATE_RELATIONALS(classname)
: automatically generate non-member relational operators > , >=, <=, !=
for a class that already implements operators == , <
.For evaluating expressions:
CXXO_TYPEOF()
- determines the type of an expression if the compiler has the capability.CXXO_DECLTYPE()
- determines the type of an expression in C++11-onwards mode.Including #include <cxxomfort/library/i12n.hpp>
(explicitly or implicitly) gives access to the sequence intialization helper macros :
CXXO_I12N_BEG
CXXO_I12N_END
CXXO_I12N_SEQ