Proper #define for UAVCAN_EXCEPTIONS

This commit is contained in:
Pavel Kirienko
2014-03-17 20:48:03 +04:00
parent 093328e386
commit 3f99cdd607
3 changed files with 13 additions and 2 deletions
+4 -2
View File
@@ -35,8 +35,10 @@ namespace uavcan
* UAVCAN can be explicitly told to ignore exceptions, or it can be detected automatically.
*/
#ifndef UAVCAN_EXCEPTIONS
# if defined(__EXCEPTIONS) || defined(_HAS_EXCEPTIONS)
# define UAVCAN_EXCEPTIONS 1
# if __EXCEPTIONS || _HAS_EXCEPTIONS
# define UAVCAN_EXCEPTIONS 1
# else
# define UAVCAN_EXCEPTIONS 0
# endif
#endif
@@ -4,6 +4,7 @@
#pragma once
#include <cassert>
#include <bitset>
#include <algorithm>
#include <stdexcept>
@@ -13,6 +14,10 @@
#include <uavcan/impl_constants.hpp>
#include <uavcan/marshal/type_util.hpp>
#ifndef UAVCAN_EXCEPTIONS
# error UAVCAN_EXCEPTIONS
#endif
namespace uavcan
{
+4
View File
@@ -8,6 +8,10 @@
#include <uavcan/fatal_error.hpp>
#include <uavcan/impl_constants.hpp>
#ifndef UAVCAN_EXCEPTIONS
# error UAVCAN_EXCEPTIONS
#endif
namespace uavcan
{