This project is a part of Staticlibs.
This project contains a number of helper macros (detect operating system etc).
This library is header-only and has no dependencies.
Link to the API documentation.
Library include:
#include "staticlib/config.hpp"
Defines STATICLIB_<OS_NAME> macro, where OS_NAME is one of:
WINDOWSIOSMACANDROIDLINUX
Defines STATICLIB_NOEXCEPT and STATICLIB_NOEXCEPT_FALSE with noexcept and noexcept(false)
corresponding values on all supported compilers except MSVC 2013 where these macros are empty.
STATICLIB_CURRENT_FUNCTION macro (borrowed from Boost) that extracts compiler-specific
name of the current function.
TRACEMSG macro takes a message and adds to it a file location information and function name.
Multiple "traced" messages can be combined together to look similar to Java stacktraces.
slassert macro that works similar to <cassert> one, but throws sl::config::assert_exception with
TRACEMSG tracing instead of calling std::abort. This macro is not included with config.hpp, use:
#include "staticlib/config/assert.hpp"
This project is released under the Apache License 2.0.
2017-12-22
- version 1.1.1
- vs2017 support
2017-04-08
- version 1.1.0
- non-macros moved to staticlib_support
2017-02-04
- version 1.0.3
optional,observer_ptrandspanadded
2017-01-27
- version 1.0.2
make_uniqueremoveddeferadded
2016-01-16
- version 1.0.1
- minor CMake changes
2015-11-21
- version 1.0.0
- initial public version