aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/PreprocessorDirectives.dox
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-05-20 15:26:09 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-05-20 15:26:09 +0200
commit6a15e14cda474cd32d26a62ff78a99421e2cd4c0 (patch)
treea026abdcf797ebe589f6218f91c78306efa3e34f /doc/PreprocessorDirectives.dox
parentccaace03c90b9d9952889a2b8f133a6e7ab86223 (diff)
Document EIGEN_MAX_CPP_VER and user controllable compiler features.
Diffstat (limited to 'doc/PreprocessorDirectives.dox')
-rw-r--r--doc/PreprocessorDirectives.dox33
1 files changed, 30 insertions, 3 deletions
diff --git a/doc/PreprocessorDirectives.dox b/doc/PreprocessorDirectives.dox
index 2d9f9b060..7f60c70c6 100644
--- a/doc/PreprocessorDirectives.dox
+++ b/doc/PreprocessorDirectives.dox
@@ -49,6 +49,36 @@ are doing.
the correct size. Not defined by default.
+\section TopicPreprocessorDirectivesCppVersion C++ standard features
+
+By default, %Eigen strive to automatically detect and enable langage features at compile-time based on
+the information provided by the compiler.
+
+ - \b EIGEN_MAX_CPP_VER - disables usage of C++ features requiring a version greater than EIGEN_MAX_CPP_VER.
+ Possible values are: 03, 11, 14, 17, etc. If not defined (the default), %Eigen enables all features supported
+ by the compiler.
+
+Individual features can be explicitly enabled or disabled by defining the following token to 0 or 1 respectively.
+For instance, one might limit the C++ version to C++03 by defining EIGEN_MAX_CPP_VER=03, but still enable C99 math
+functions by defining EIGEN_HAS_C99_MATH=1.
+
+ - \b EIGEN_HAS_C99_MATH - controls the usage of C99 math functions such as erf, erfc, lgamma, etc.
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_CXX11_MATH - controls the implementation of some functions such as round, logp1, isinf, isnan, etc.
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_RVALUE_REFERENCES - defines whetehr rvalue references are supported
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_STD_RESULT_OF - defines whether std::result_of is supported
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_VARIADIC_TEMPLATES - defines whether variadic templates are supported
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_CONSTEXPR - defines whether relaxed const expression are supported
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<14.
+ - \b EIGEN_HAS_CXX11_CONTAINERS - defines whether STL's containers follows C++11 specifications
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+ - \b EIGEN_HAS_CXX11_NOEXCEPT - defines whether noexcept is supported
+ Automatic detection disabled if EIGEN_MAX_CPP_VER<11.
+
\section TopicPreprocessorDirectivesAssertions Assertions
The %Eigen library contains many assertions to guard against programming errors, both at compile time and at
@@ -63,9 +93,6 @@ run time. However, these assertions do cost time and can thus be turned off.
macro if you want to do something else, like throwing an exception.
- \b EIGEN_MPL2_ONLY - disable non MPL2 compatible features, or in other words disable the features which
are still under the LGPL.
- - \b EIGEN_MAX_CPP_VER - disables usage of C++ features requiring a version greater than EIGEN_MAX_CPP_VER.
- Possible values are: 03, 11, 14, 17, etc. If not defined (the default), %Eigen enables all features supported
- by the compiler.
\section TopicPreprocessorDirectivesPerformance Alignment, vectorization and performance tweaking