add feature detection machinery

This commit is contained in:
Ferdinand Bachmann
2020-04-18 12:39:58 +02:00
parent ce9d000673
commit 5feb3f4f60
7 changed files with 315 additions and 222 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef _RING_BUFFER_CONFIG_H
#define _RING_BUFFER_CONFIG_H
#ifdef RING_BUFFER_NOEXCEPT
#define NOEXCEPT(x) noexcept(x)
#else
#define NOEXCEPT(x)
#endif
#ifdef RING_BUFFER_CONSTEXPR
#define CONSTEXPR constexpr
#else
#define CONSTEXPR
#endif
#ifdef RING_BUFFER_CONSTEXPR_DESTRUCTORS
#define CONSTEXPR_D CONSTEXPR
#else
#define CONSTEXPR_D
#endif
#endif