macro_reference.qbk

来自「Boost provides free peer-reviewed portab」· QBK 代码 · 共 903 行 · 第 1/3 页

QBK
903
字号
``void f() {}void g() { return f(); }``]]][endsect][#config_features][section Macros that describe optional features]The following macros describe features that are not required by the C++standard. The macro is only defined if the feature is present.[table[[Macro       ][Section        ][Description       ]][[`BOOST_HAS_BETHREADS`][Platform][The platform supports BeOS style threads.]][[`BOOST_HAS_CLOCK_GETTIME`][Platform][The platform has the POSIX API `clock_gettime`.]][[`BOOST_HAS_DECLSPEC`][Compiler][The compiler uses `__declspec(dllexport)` and `__declspec(dllimport)` toexport/import symbols from dll's.]][[`BOOST_HAS_DIRENT_H`][Platform][The platform has the POSIX header `<dirent.h>`.]][[`BOOST_HAS_EXPM1`][Platform][The platform has the functions `expm1`, `expm1f` and `expm1l` in `<math.h>`]][[`BOOST_HAS_FTIME`][Platform][The platform has the Win32 API `GetSystemTimeAsFileTime`.]][[`BOOST_HAS_GETTIMEOFDAY`][Platform][The platform has the POSIX API `gettimeofday`.]][[`BOOST_HAS_HASH`][Standard library][The C++ implementation provides the (SGI) hash_set and hash_map classes.When defined, `BOOST_HASH_SET_HEADER` and `BOOST_HASH_LIST_HEADER` will containthe names of the header needed to access hash_set and hash_map;`BOOST_STD_EXTENSION_NAMESPACE` will provide the namespace in which the twoclass templates reside.]][[`BOOST_HAS_LOG1P`][Platform][The platform has the functions `log1p`, `log1pf` and `log1pl` in `<math.h>`.]][[`BOOST_HAS_MACRO_USE_FACET`][Standard library][The standard library lacks a conforming `std::use_facet`, but has a macro`_USE(loc, Type)` that does the job. This is primarily for the Dinkumwarestd lib.]][[`BOOST_HAS_MS_INT64`][Compiler][The compiler supports the `__int64` data type.]][[`BOOST_HAS_NANOSLEEP`][Platform][The platform has the POSIX API nanosleep.]][[`BOOST_HAS_NL_TYPES_H`][Platform][The platform has an `<nl_types.h>`.]][[`BOOST_HAS_NRVO`][Compiler][Indicated that the compiler supports the named return value optimization(NRVO). Used to select the most efficient implementation for some function.See [@../../../../boost/operators.hpp `<boost/operators.hpp>`] for example.]][[`BOOST_HAS_PARTIAL_STD_ALLOCATOR`][Standard Library][The standard library has a partially conforming `std::allocator` class, butwithout any of the member templates.]][[`BOOST_HAS_PTHREAD_DELAY_NP`][Platform][The platform has the POSIX API `pthread_delay_np`.]][[`BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE`][Platform][The platform has the POSIX API `pthread_mutexattr_settype`.]][[`BOOST_HAS_PTHREAD_YIELD`][Platform][The platform has the POSIX API `pthread_yield`.]][[`BOOST_HAS_PTHREADS`][Platform][The platform support POSIX style threads.]][[`BOOST_HAS_SCHED_YIELD`][Platform][The platform has the POSIX API `sched_yield`.]][[`BOOST_HAS_SGI_TYPE_TRAITS`][Compiler, Standard library][The compiler has native support for SGI style type traits.]][[`BOOST_HAS_STDINT_H`][Platform][The platform has a `<stdint.h>`]][[`BOOST_HAS_SLIST`][Standard library][The C++ implementation provides the (SGI) slist class. When defined,`BOOST_SLIST_HEADER` will contain the name of the header needed to access`slist` and `BOOST_STD_EXTENSION_NAMESPACE` will provide the namespace inwhich `slist` resides.]][[`BOOST_HAS_STLP_USE_FACET`][Standard library][The standard library lacks a conforming `std::use_facet`, but has a workaroundclass-version that does the job. This is primarily for the STLport std lib.]][[`BOOST_HAS_TR1_ARRAY`][Standard library][The library has a TR1 conforming version of `<array>`.]][[`BOOST_HAS_TR1_COMPLEX_OVERLOADS`][Standard library][The library has a version of `<complex>` that supports passing scalars to thecomplex number algorithms.]][[`BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG`][Standard library][The library has a version of `<complex>` that includes the new inverse trigfunctions from TR1.]][[`BOOST_HAS_TR1_REFERENCE_WRAPPER`][Standard library][The library has TR1 conforming reference wrappers in `<functional>`.]][[`BOOST_HAS_TR1_RESULT_OF`][Standard library][The library has a TR1 conforming result_of template in `<functional>`.]][[`BOOST_HAS_TR1_MEM_FN`][Standard library][The library has a TR1 conforming mem_fn function template in `<functional>`.]][[`BOOST_HAS_TR1_BIND`][Standard library][The library has a TR1 conforming bind function template in `<functional>`.]][[`BOOST_HAS_TR1_FUNCTION`][Standard library][The library has a TR1 conforming function class template in `<functional>`.]][[`BOOST_HAS_TR1_HASH`][Standard library][The library has a TR1 conforming hash function template in `<functional>`.]][[`BOOST_HAS_TR1_SHARED_PTR`][Standard library][The library has a TR1 conforming `shared_ptr` class template in `<memory>`.]][[`BOOST_HAS_TR1_RANDOM`][Standard library][The library has a TR1 conforming version of `<random>`.]][[`BOOST_HAS_TR1_REGEX`][Standard library][The library has a TR1 conforming version of `<regex>`.]][[`BOOST_HAS_TR1_TUPLE`][Standard library][The library has a TR1 conforming version of `<tuple>`.]][[`BOOST_HAS_TR1_TYPE_TRAITS`][Standard library][The library has a TR1 conforming version of `<type_traits>`.]][[`BOOST_HAS_TR1_UTILITY`][Standard library][The library has the TR1 additions to `<utility>` (tuple interface to `std::pair`).]][[`BOOST_HAS_TR1_UNORDERED_MAP`][Standard library][The library has a TR1 conforming version of `<unordered_map>`.]][[`BOOST_HAS_TR1_UNORDERED_SET`][Standard library][The library has a TR1 conforming version of `<unordered_set>`.]][[`BOOST_HAS_TR1`][Standard library][Implies all the other `BOOST_HAS_TR1_*` macros should be set.]][[`BOOST_HAS_THREADS`][Platform, Compiler][Defined if the compiler, in its current translation mode, supports multiplethreads of execution.]][[`BOOST_HAS_TWO_ARG_USE_FACET`][Standard library][The standard library lacks a conforming std::use_facet, but has a twoargument version that does the job. This is primarily for the Rogue Wavestd lib.]][[`BOOST_HAS_UNISTD_H`][Platform][The Platform provides `<unistd.h>`.]][[`BOOST_HAS_WINTHREADS`][Platform][The platform supports MS Windows style threads.]][[`BOOST_MSVC_STD_ITERATOR`][Standard library][Microsoft's broken version of `std::iterator` is being used. This implies that`std::iterator` takes no more than two template parameters.]][[`BOOST_MSVC6_MEMBER_TEMPLATES`][Compiler][Microsoft Visual C++ 6.0 has enough member template idiosyncrasies(being polite) that `BOOST_NO_MEMBER_TEMPLATES` is defined for this compiler.`BOOST_MSVC6_MEMBER_TEMPLATES` is defined to allow compiler specific workarounds.This macro gets defined automatically if `BOOST_NO_MEMBER_TEMPLATES` is notdefined - in other words this is treated as a strict subset of the featuresrequired by the standard.]][[`BOOST_HAS_STDINT_H`][Platform][There are no 1998 C++ Standard headers `<stdint.h>` or `<cstdint>`, although the1999 C Standard does include `<stdint.h>`. If `<stdint.h>` is present,`<boost/stdint.h>` can make good use of it, so a flag is supplied (signallingpresence; thus the default is not present, conforming to the current C++standard).]]][endsect][section Macros that describe possible C++0x features]The following macros describe features that are likely to be included in theupcoming ISO C++ standard, C++0x, but have not yet been approved for inclusionin the language.[table[[Macro     ][Description     ]][[`BOOST_HAS_CONCEPTS`][The compiler supports  concepts.]]][endsect][section Macros that describe C++0x features not supported]The following macros describe features in the upcoming ISO C++ standard, C++0x,that are not yet supported by a particular compiler.[table[[Macro     ][Description     ]][[`BOOST_NO_CHAR16_T`][The compiler does not supporttype `char16_t`. ]]                       [[`BOOST_NO_CHAR32_T`][The compiler does not support type `char32_t`. ]]                       [[`BOOST_NO_CONSTEXPR`][The compiler does not support `constexpr`. ]]                      [[`BOOST_NO_DECLTYPE`][The compiler does not support `decltype`. ]]                       [[`BOOST_NO_DEFAULTED_FUNCTIONS`][The compiler does not support defaulted (`= default`) functions.              [[`BOOST_NO_DELETED_FUNCTIONS`][The compiler does not support deleted (`= delete`) functions.              ]]              [[`BOOST_NO_EXPLICIT_CONVERSION_OPERATIONS`][The compiler does not support explicit conversion operators (`explicit operator T()`).              ]] [[`BOOST_NO_EXTERN_TEMPLATE`][The compiler does not support explicit instantiation declarations for templates (`explicit template`).]][[`BOOST_NO_LONG_LONG`][The compiler does not support `long long`.]]                [[`BOOST_NO_RAW_LITERALS`][The compiler does not supportraw string literals. ]]                   [[`BOOST_NO_RVALUE_REFERENCES`][The compiler does not supportr-value references. ]]              [[`BOOST_NO_SCOPED_ENUMS`][The compiler does not supportscoped enumerations (`enum class`). ]]                   [[`BOOST_NO_STATIC_ASSERT`][The compiler does not support`static_assert`. ]]                  [[`BOOST_NO_UNICODE_LITERALS`][The compiler does not supportUnicode (`u8`, `u`, `U') literals. ]]               [[`BOOST_NO_VARIADIC_TEMPLATES`][The compiler does not supportvariadic templates. ]]][endsect][#config_helpers][section Boost Helper Macros]The following macros are either simple helpers, or macros that provideworkarounds for compiler/standard library defects.[table[[Macro           ][Description            ]][[`BOOST_DEDUCED_TYPENAME`][Some compilers don't support the use of typename for dependent types in deducedcontexts. This macro expands to nothing on those compilers, and typenameelsewhere. For example, replace:`template <class T> void f(T, typename T::type);`with:`template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);`]][[`BOOST_HASH_MAP_HEADER`][The header to include to get the SGI `hash_map` class. This macro is onlyavailable if `BOOST_HAS_HASH` is defined.]][[`BOOST_HASH_SET_HEADER`][The header to include to get the SGI `hash_set` class. This macro is onlyavailable if `BOOST_HAS_HASH` is defined.]][[`BOOST_SLIST_HEADER`][The header to include to get the SGI `slist` class. This macro is only

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?