Changeset 3602


Ignore:
Timestamp:
Jan 22, 2017, 2:36:48 PM (5 years ago)
Author:
Peter
Message:

doc how to turn on cxx11 features. closes #878

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/README

    r3590 r3602  
    152152  #> ./configure LDFLAGS="-L/usr/lib64/atlas"
    153153
    154 === Rvalues ===
    155 
    156 The configure script tries to find a modern compiler that understands
    157 rvalues and move semantics, and turns on switches such as '-std=c++11'
    158 if needed. This search can be turned off by invoking
    159 
    160   #> ./configure --without-cxx11
    161 
    162 If a compiler with rvalue support is found, macro YAT_HAVE_RVALUE is
    163 #defined in 'config.h' and move constructors and move assignments is
    164 available for certain classes plus that moves are used internally. If
    165 yat is built with rvalue support, yat's header are not compatible with
    166 a compiler that lack the support. Packages that use autoconf you can
    167 use macro YAT_CXX_RVALUE, defined in 'm4/yat_cxx11', to turn on
    168 the compiler switch in the same fashion as yat's
    169 configure. Alternatively, yat's choice of compiler with needed
    170 switches can be accessed via `yat-config --cxx`. If necessary, you can
    171 turn off rvalue support completely by compiling your program with the
    172 preprocessor definition YAT_WITHOUT_CXX11.
     154=== C++11 Features ===
     155
     156If enabled, yat uses C++11 features such as rvalues and std::atomic,
     157which make the library faster and safer. To turn on these features you
     158need to configure yat with option
     159
     160  #> ./configure --enable-cxx11
     161
     162This will make the configure script test if the compiler supports
     163these features, and, if nessecary, add options such as -std=cxx11. If
     164the search is sucessful corresponding macro is defined in file
     165'yat/utility/config_public.h'. If you want to use these features in
     166your own code, you need turn them on by setting preproccessor
     167definition YAT_WITH_CXX11 (and of course make sure the compiler
     168supports them).
    173169
    174170=== Doxygen ===
Note: See TracChangeset for help on using the changeset viewer.