mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 06:13:33 +08:00
Proper #define for UAVCAN_EXCEPTIONS
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
#include <uavcan/fatal_error.hpp>
|
||||
#include <uavcan/impl_constants.hpp>
|
||||
|
||||
#ifndef UAVCAN_EXCEPTIONS
|
||||
# error UAVCAN_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user