diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-12-22 21:37:35 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-12-23 09:28:57 +0100 |
commit | a385c5c568fbbb56750f68afed16b26b6828b5d4 (patch) | |
tree | 63b7647b5d92354c318c72e9b4ff8ef5853eef14 /include/sal | |
parent | Use char16_t string literals (diff) | |
download | core-a385c5c568fbbb56750f68afed16b26b6828b5d4.tar.gz core-a385c5c568fbbb56750f68afed16b26b6828b5d4.zip |
Make functions in rtl/character.hxx constexpr for internal use
Allows to use them in compile-time initializers.
Change-Id: Ifa4b8da5db6ad7b1d7c87cb2476f4c59abeb32d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108219
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/types.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index d3179b0e4e51..5f6dc0b1b9d5 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -387,6 +387,19 @@ namespace css = ::com::sun::star; #define SAL_OVERRIDE #endif +/** C++11 "constexpr" feature. + + For LIBO_INTERNAL_ONLY, declare that it's possible to evaluate the value + at compile time. + + @since LibreOffice 7.2 +*/ +#if defined LIBO_INTERNAL_ONLY +#define SAL_CONSTEXPR constexpr +#else +#define SAL_CONSTEXPR +#endif + #endif /* __cplusplus */ #ifdef __cplusplus |