mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Multiple code changes, delegates & timers
This commit is contained in:
parent
331e07b272
commit
d2ba5e9956
@ -196,11 +196,11 @@ namespace etl
|
||||
};
|
||||
|
||||
// The type of the callback function.
|
||||
#if ETL_CPP11_SUPPORTED & !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
//#if ETL_CPP11_SUPPORTED & !defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
typedef etl::delegate<void(notification)> callback_type;
|
||||
#else
|
||||
typedef etl::delegate<void, notification> callback_type;
|
||||
#endif
|
||||
//#else
|
||||
// typedef etl::delegate<void, notification> callback_type;
|
||||
//#endif
|
||||
|
||||
//*********************************
|
||||
buffer_descriptors(TBuffer* pbuffers_, callback_type callback_ = callback_type())
|
||||
|
||||
@ -40,10 +40,7 @@ SOFTWARE.
|
||||
#include "atomic.h"
|
||||
#include "error_handler.h"
|
||||
#include "placement_new.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#include "delegate.h"
|
||||
#endif
|
||||
#include "delegate.h"
|
||||
|
||||
#if defined(ETL_IN_UNIT_TEST) && ETL_NOT_USING_STL
|
||||
#define ETL_DISABLE_TIMER_UPDATES
|
||||
@ -84,11 +81,7 @@ namespace etl
|
||||
/// The configuration of a timer.
|
||||
struct callback_timer_data
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(void)> callback_type;
|
||||
#else
|
||||
typedef etl::delegate<void, void> callback_type;
|
||||
#endif
|
||||
|
||||
enum callback_type_id
|
||||
{
|
||||
@ -386,11 +379,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(void)> callback_type;
|
||||
#else
|
||||
typedef etl::delegate<void, void> callback_type;
|
||||
#endif
|
||||
|
||||
//*******************************************
|
||||
/// Register a timer.
|
||||
|
||||
@ -55,11 +55,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(void)> callback_type;
|
||||
#else
|
||||
typedef etl::delegate<void, void> callback_type;
|
||||
#endif
|
||||
|
||||
//*******************************************
|
||||
/// Register a timer.
|
||||
|
||||
@ -50,17 +50,10 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(void)> callback_type;
|
||||
typedef etl::delegate<bool(void)> try_lock_type;
|
||||
typedef etl::delegate<void(void)> lock_type;
|
||||
typedef etl::delegate<void(void)> unlock_type;
|
||||
#else
|
||||
typedef etl::delegate<void, void> callback_type;
|
||||
typedef etl::delegate<bool, void> try_lock_type;
|
||||
typedef etl::delegate<void, void> lock_type;
|
||||
typedef etl::delegate<void, void> unlock_type;
|
||||
#endif
|
||||
|
||||
//*******************************************
|
||||
/// Register a timer.
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_t = etl::crc_type<etl::private_crc::crc16_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_a_t = etl::crc_type<etl::private_crc::crc16_a_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_arc_t = etl::crc_type<etl::private_crc::crc16_arc_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_aug_ccitt_t = etl::crc_type<etl::private_crc::crc16_aug_ccitt_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_buypass_t = etl::crc_type<etl::private_crc::crc16_buypass_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_ccitt_t = etl::crc_type<etl::private_crc::crc16_ccitt_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_cdma2000_t = etl::crc_type<etl::private_crc::crc16_cdma2000_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_dds110_t = etl::crc_type<etl::private_crc::crc16_dds110_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_dect_r_t = etl::crc_type<etl::private_crc::crc16_dect_r_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_dect_x_t = etl::crc_type<etl::private_crc::crc16_dect_x_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_dnp_t = etl::crc_type<etl::private_crc::crc16_dnp_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_en13757_t = etl::crc_type<etl::private_crc::crc16_en13757_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_genibus_t = etl::crc_type<etl::private_crc::crc16_genibus_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_kermit_t = etl::crc_type<etl::private_crc::crc16_kermit_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_maxim_t = etl::crc_type<etl::private_crc::crc16_maxim_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_mcrf4xx_t = etl::crc_type<etl::private_crc::crc16_mcrf4xx_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_modbus_t = etl::crc_type<etl::private_crc::crc16_modbus_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_profibus_t = etl::crc_type<etl::private_crc::crc16_profibus_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_riello_t = etl::crc_type<etl::private_crc::crc16_riello_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_t10dif_t = etl::crc_type<etl::private_crc::crc16_t10dif_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_teledisk_t = etl::crc_type<etl::private_crc::crc16_teledisk_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_tms37157_t = etl::crc_type<etl::private_crc::crc16_tms37157_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_usb_t = etl::crc_type<etl::private_crc::crc16_usb_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc16_x25_t = etl::crc_type<etl::private_crc::crc16_x25_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -36,7 +36,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_ccitt_t = etl::crc_type<etl::private_crc::crc8_ccitt_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_cdma2000_t = etl::crc_type<etl::private_crc::crc8_cdma2000_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_darc_t = etl::crc_type<etl::private_crc::crc8_darc_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_dvbs2_t = etl::crc_type<etl::private_crc::crc8_dvbs2_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_ebu_t = etl::crc_type<etl::private_crc::crc8_ebu_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_icode_t = etl::crc_type<etl::private_crc::crc8_icode_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_itu_t = etl::crc_type<etl::private_crc::crc8_itu_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_maxim_t = etl::crc_type<etl::private_crc::crc8_maxim_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_rohc_t = etl::crc_type<etl::private_crc::crc8_rohc_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <size_t Table_Size>
|
||||
using crc8_wcdma_t = etl::crc_type<etl::private_crc::crc8_wcdma_parameters, Table_Size>;
|
||||
#else
|
||||
|
||||
@ -33,7 +33,7 @@ SOFTWARE.
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
#include "private/delegate_cpp11.h"
|
||||
#else
|
||||
#include "private/delegate_cpp03.h"
|
||||
|
||||
@ -46,7 +46,7 @@ namespace etl
|
||||
/// \tparam Delegates Pointer to an array of delegate pointers.
|
||||
/// The delegate ids must range between Offset and Offset + Range - 1.
|
||||
//***************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <const size_t Range,
|
||||
const size_t Offset = 0U,
|
||||
const etl::delegate<void(size_t)>* Delegates = nullptr>
|
||||
@ -98,7 +98,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
template <const size_t Range,
|
||||
const size_t Offset>
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
class delegate_service<Range, Offset, nullptr>
|
||||
#else
|
||||
class delegate_service
|
||||
@ -106,11 +106,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(size_t)> delegate_type;
|
||||
#else
|
||||
typedef etl::delegate<void, size_t> delegate_type;
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
|
||||
@ -80,7 +80,7 @@ namespace etl
|
||||
// For internal FSM use.
|
||||
typedef typename etl::larger_type<etl::message_id_t>::type fsm_internal_id_t;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
template <typename, typename, const etl::fsm_state_id_t, typename...>
|
||||
class fsm_state;
|
||||
#else
|
||||
@ -184,7 +184,7 @@ namespace etl
|
||||
friend class etl::fsm;
|
||||
friend class etl::hfsm;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
template <typename, typename, const etl::fsm_state_id_t, typename...>
|
||||
friend class fsm_state;
|
||||
#else
|
||||
@ -494,7 +494,7 @@ namespace etl
|
||||
//*************************************************************************************************
|
||||
// For C++17 and above.
|
||||
//*************************************************************************************************
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
//***************************************************************************
|
||||
// The definition for all types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -92,7 +92,7 @@ namespace etl
|
||||
// For internal FSM use.
|
||||
typedef typename etl::larger_type<etl::message_id_t>::type fsm_internal_id_t;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
template <typename, typename, const etl::fsm_state_id_t, typename...>
|
||||
class fsm_state;
|
||||
#else
|
||||
@ -203,7 +203,7 @@ namespace etl
|
||||
friend class etl::fsm;
|
||||
friend class etl::hfsm;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
template <typename, typename, const etl::fsm_state_id_t, typename...>
|
||||
friend class fsm_state;
|
||||
#else
|
||||
@ -520,7 +520,7 @@ namespace etl
|
||||
//*************************************************************************************************
|
||||
// For C++17 and above.
|
||||
//*************************************************************************************************
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03) // For C++17 and above
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FSM_FORCE_CPP03_IMPLEMENTATION) // For C++17 and above
|
||||
//***************************************************************************
|
||||
// The definition for all types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -75,7 +75,7 @@ cog.outl("//********************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_TYPE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type and size.
|
||||
/// Defines 'value_type' which is the type of the largest parameter.
|
||||
@ -197,7 +197,7 @@ namespace etl
|
||||
/*[[[end]]]*/
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_ALIGNMENT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_ALIGNMENT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest alignment.
|
||||
/// Defines <b>value</b> which is the largest alignment of all the parameters.
|
||||
@ -372,7 +372,7 @@ namespace etl
|
||||
using larger_type_t = typename larger_type<T>::type;
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type, size and alignment.
|
||||
/// Defines <b>value</b> which is the largest type, size and alignment of all the parameters.
|
||||
|
||||
@ -74,7 +74,7 @@ cog.outl("//********************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03)
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// The definition for all message types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -334,7 +334,7 @@ namespace etl
|
||||
//*************************************************************************************************
|
||||
// For C++17 and above.
|
||||
//*************************************************************************************************
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_ROUTER_FORCE_CPP03)
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// The definition for all message types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -75,7 +75,7 @@ cog.outl("//********************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type and size.
|
||||
/// Defines 'value_type' which is the type of the largest parameter.
|
||||
|
||||
@ -83,7 +83,7 @@ namespace etl
|
||||
typedef T2 type2;
|
||||
};
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// type_id_lookup
|
||||
//***************************************************************************
|
||||
|
||||
@ -56,7 +56,7 @@ cog.outl("//********************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// Variadic version.
|
||||
//***************************************************************************
|
||||
|
||||
@ -774,7 +774,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*********************************************************************
|
||||
/// Constructs a value at the end of the indirect_vector.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the indirect_vector is already full.
|
||||
|
||||
@ -63,7 +63,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_TYPE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type and size.
|
||||
/// Defines 'value_type' which is the type of the largest parameter.
|
||||
@ -167,7 +167,7 @@ namespace etl
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_ALIGNMENT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_ALIGNMENT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest alignment.
|
||||
/// Defines <b>value</b> which is the largest alignment of all the parameters.
|
||||
@ -324,7 +324,7 @@ namespace etl
|
||||
using larger_type_t = typename larger_type<T>::type;
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_LARGEST_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type, size and alignment.
|
||||
/// Defines <b>value</b> which is the largest type, size and alignment of all the parameters.
|
||||
|
||||
@ -572,7 +572,7 @@ namespace etl
|
||||
/// mem_cast_var
|
||||
/// mem_cast from a variadic list of types
|
||||
//*****************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_MEM_CAST_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <typename... TTypes>
|
||||
using mem_cast_types = etl::mem_cast<etl::largest<TTypes...>::size, etl::largest<TTypes...>::alignment>;
|
||||
#else
|
||||
|
||||
@ -1987,7 +1987,7 @@ namespace etl
|
||||
return reinterpret_cast<const T*>(raw);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5) && !defined(ETL_UNINITIALIZED_BUFFER_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5) && !defined(ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION)
|
||||
alignas(VAlignment) char raw[Object_Size * N_Objects];
|
||||
#else
|
||||
union
|
||||
@ -2076,7 +2076,7 @@ namespace etl
|
||||
return reinterpret_cast<const T*>(raw + (sizeof(T) * N_Objects));
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5) && !defined(ETL_UNINITIALIZED_BUFFER_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5) && !defined(ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION)
|
||||
alignas(Alignment) char raw[sizeof(T) * N_Objects];
|
||||
#else
|
||||
union
|
||||
|
||||
@ -62,7 +62,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03)
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// The definition for all message types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -322,7 +322,7 @@ namespace etl
|
||||
//*************************************************************************************************
|
||||
// For C++17 and above.
|
||||
//*************************************************************************************************
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_ROUTER_FORCE_CPP03)
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// The definition for all message types.
|
||||
//***************************************************************************
|
||||
|
||||
@ -51,17 +51,10 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
typedef etl::delegate<void(void)> callback_type;
|
||||
typedef etl::delegate<bool(void)> try_lock_type;
|
||||
typedef etl::delegate<void(void)> lock_type;
|
||||
typedef etl::delegate<void(void)> unlock_type;
|
||||
#else
|
||||
typedef etl::delegate<void, void> callback_type;
|
||||
typedef etl::delegate<bool, void> try_lock_type;
|
||||
typedef etl::delegate<void, void> lock_type;
|
||||
typedef etl::delegate<void, void> unlock_type;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -232,7 +232,7 @@ namespace etl
|
||||
return observer_list.size();
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_OBSERVER_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*****************************************************************
|
||||
/// Notify all of the observers, sending them the notification.
|
||||
///\tparam TNotification the notification type.
|
||||
@ -297,7 +297,7 @@ namespace etl
|
||||
Observer_List observer_list;
|
||||
};
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_OBSERVER_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
//*****************************************************************
|
||||
/// The observer class for N types.
|
||||
|
||||
@ -414,7 +414,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_OPTIONAL_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value.
|
||||
///\param args The arguments to construct with.
|
||||
|
||||
@ -180,7 +180,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_PRIORITY_QUEUE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the queue.
|
||||
/// If asserts or exceptions are enabled, throws an etl::priority_queue_full
|
||||
|
||||
@ -55,7 +55,11 @@
|
||||
#include "../utility.h"
|
||||
#include "../optional.h"
|
||||
|
||||
#if defined(ETL_IN_DELEGATE_CPP03_UNIT_TEST)
|
||||
namespace etl_cpp03
|
||||
#else
|
||||
namespace etl
|
||||
#endif
|
||||
{
|
||||
namespace private_delegate
|
||||
{
|
||||
@ -167,12 +171,17 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Declaration.
|
||||
//*************************************************************************
|
||||
template <typename TReturn, typename TParam = void>
|
||||
class delegate : public private_delegate::call_if_impl<delegate<TReturn, TParam>, TReturn, TParam>
|
||||
template <typename T>
|
||||
class delegate;
|
||||
|
||||
|
||||
|
||||
template <typename TReturn, typename TParam>
|
||||
class delegate<TReturn(TParam)> : public private_delegate::call_if_impl<delegate<TReturn(TParam)>, TReturn, TParam>
|
||||
{
|
||||
public:
|
||||
|
||||
using private_delegate::call_if_impl< delegate<TReturn, TParam>, TReturn, TParam>::call_if;
|
||||
using private_delegate::call_if_impl<delegate<TReturn(TParam)>, TReturn, TParam>::call_if;
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
@ -368,7 +377,11 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Create from function (Compile time).
|
||||
//*************************************************************************
|
||||
delegate& operator =(const delegate& rhs) = default;
|
||||
delegate& operator =(const delegate& rhs)
|
||||
{
|
||||
invocation = rhs.invocation;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Create from Lambda or Functor.
|
||||
@ -551,11 +564,12 @@ namespace etl
|
||||
/// Specialisation for void parameter.
|
||||
//*************************************************************************
|
||||
template <typename TReturn>
|
||||
class delegate<TReturn, void> : public private_delegate::call_if_impl<delegate<TReturn, void>, TReturn, void>
|
||||
class delegate<TReturn(void)>
|
||||
: public private_delegate::call_if_impl<delegate<TReturn(void)>, TReturn, void>
|
||||
{
|
||||
public:
|
||||
|
||||
using private_delegate::call_if_impl< delegate<TReturn, void>, TReturn, void>::call_if;
|
||||
using private_delegate::call_if_impl< delegate<TReturn(void)>, TReturn, void>::call_if;
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
|
||||
@ -417,8 +417,10 @@ namespace etl
|
||||
/// Constructs a delegate from an object and stub.
|
||||
//*************************************************************************
|
||||
ETL_CONSTEXPR14 delegate(void* object, stub_type stub)
|
||||
: invocation(object, stub)
|
||||
//: invocation(object, stub)
|
||||
{
|
||||
invocation.object = object;
|
||||
invocation.stub = stub;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -464,7 +464,7 @@ namespace etl
|
||||
type_id = other.type_id;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VARIANT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Emplace with variadic constructor parameters.
|
||||
//*************************************************************************
|
||||
|
||||
@ -333,7 +333,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
|
||||
@ -284,7 +284,7 @@ namespace etl
|
||||
return result;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue without locking.
|
||||
//*************************************************************************
|
||||
@ -308,7 +308,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
//*************************************************************************
|
||||
@ -578,7 +578,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue without locking.
|
||||
//*************************************************************************
|
||||
@ -600,7 +600,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
//*************************************************************************
|
||||
@ -738,7 +738,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
value = etl::move(p_buffer[this->read_index]);
|
||||
#else
|
||||
value = p_buffer[this->read_index];
|
||||
|
||||
@ -182,7 +182,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -424,7 +424,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue.
|
||||
//*************************************************************************
|
||||
@ -446,7 +446,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
//*************************************************************************
|
||||
@ -564,7 +564,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
value = etl::move(p_buffer[read_index]);
|
||||
#else
|
||||
value = p_buffer[read_index];
|
||||
|
||||
@ -225,7 +225,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ATOMIC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue.
|
||||
//*************************************************************************
|
||||
@ -248,7 +248,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ATOMIC_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -398,7 +398,7 @@ namespace etl
|
||||
|
||||
size_type next_index = get_next_index(read_index, RESERVED);
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
value = etl::move(p_buffer[read_index]);
|
||||
#else
|
||||
value = p_buffer[read_index];
|
||||
|
||||
@ -82,7 +82,7 @@ namespace etl
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
///\param value The value to use to construct the item to push to the queue.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <typename ... Args>
|
||||
bool emplace_from_isr(Args&&... args)
|
||||
{
|
||||
@ -238,7 +238,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -363,7 +363,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
value = etl::move(p_buffer[read_index]);
|
||||
#else
|
||||
value = p_buffer[read_index];
|
||||
@ -515,7 +515,7 @@ namespace etl
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION)
|
||||
template <typename ... Args>
|
||||
bool emplace(Args&&... args)
|
||||
{
|
||||
|
||||
@ -227,7 +227,7 @@ namespace etl
|
||||
return result;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue.
|
||||
/// Unlocked.
|
||||
@ -253,7 +253,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// Unlocked.
|
||||
@ -594,7 +594,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Push a value to the queue.
|
||||
/// Unlocked.
|
||||
@ -617,7 +617,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// Unlocked.
|
||||
@ -737,7 +737,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_QUEUE_LOCKABLE_FORCE_CPP03_IMPLEMENTATION)
|
||||
value = etl::move(p_buffer[this->read_index]);
|
||||
#else
|
||||
value = p_buffer[this->read_index];
|
||||
|
||||
@ -63,7 +63,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
/// Template to determine the largest type and size.
|
||||
/// Defines 'value_type' which is the type of the largest parameter.
|
||||
|
||||
@ -71,7 +71,7 @@ namespace etl
|
||||
typedef T2 type2;
|
||||
};
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// type_id_lookup
|
||||
//***************************************************************************
|
||||
|
||||
@ -44,7 +44,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//***************************************************************************
|
||||
// Variadic version.
|
||||
//***************************************************************************
|
||||
|
||||
@ -451,7 +451,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*********************************************************************
|
||||
/// Constructs a value at the end of the vector.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector is already full.
|
||||
|
||||
@ -50,7 +50,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_VISITOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_VISITOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
//*****************************************************************
|
||||
/// The visitable class for N types.
|
||||
@ -149,7 +149,7 @@ namespace etl
|
||||
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_VISITOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_VISITOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
//*****************************************************************
|
||||
/// The visitor class for N types.
|
||||
|
||||
@ -78,28 +78,28 @@ SOFTWARE.
|
||||
//#define ETL_MESSAGES_ARE_VIRTUAL
|
||||
//#define ETL_POLYMORPHIC_MESSAGES
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP03)
|
||||
#define ETL_FUNCTION_FORCE_CPP03
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#define ETL_VARIANT_FORCE_CPP03
|
||||
#define ETL_VECTOR_FORCE_CPP03
|
||||
#define ETL_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03
|
||||
#define ETL_OPTIONAL_FORCE_CPP03
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03
|
||||
#define ETL_CRC_FORCE_CPP03
|
||||
#define ETL_MEM_CAST_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03
|
||||
#define ETL_FSM_FORCE_CPP03
|
||||
#define ETL_DELEGATE_FORCE_CPP03
|
||||
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP11)
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
clear
|
||||
|
||||
cd sanity-check || exit 1
|
||||
echo "" > log.txt
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
#sudo ntpdate ntp.ubuntu.com
|
||||
clear
|
||||
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
|
||||
|
||||
@ -42,27 +42,27 @@ SOFTWARE.
|
||||
#define ETL_MESSAGE_TIMER_DISABLE_INTERRUPTS
|
||||
#define ETL_MESSAGE_TIMER_ENABLE_INTERRUPTS
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP03)
|
||||
#define ETL_FUNCTION_FORCE_CPP03
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#define ETL_VARIANT_FORCE_CPP03
|
||||
#define ETL_VECTOR_FORCE_CPP03
|
||||
#define ETL_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03
|
||||
#define ETL_OPTIONAL_FORCE_CPP03
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03
|
||||
#define ETL_CRC_FORCE_CPP03
|
||||
#define ETL_MEM_CAST_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03
|
||||
#define ETL_FSM_FORCE_CPP03
|
||||
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -42,27 +42,27 @@ SOFTWARE.
|
||||
#define ETL_MESSAGE_TIMER_DISABLE_INTERRUPTS
|
||||
#define ETL_MESSAGE_TIMER_ENABLE_INTERRUPTS
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP03)
|
||||
#define ETL_FUNCTION_FORCE_CPP03
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#define ETL_VARIANT_FORCE_CPP03
|
||||
#define ETL_VECTOR_FORCE_CPP03
|
||||
#define ETL_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03
|
||||
#define ETL_OPTIONAL_FORCE_CPP03
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03
|
||||
#define ETL_CRC_FORCE_CPP03
|
||||
#define ETL_MEM_CAST_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03
|
||||
#define ETL_FSM_FORCE_CPP03
|
||||
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -42,27 +42,27 @@ SOFTWARE.
|
||||
#define ETL_MESSAGE_TIMER_DISABLE_INTERRUPTS
|
||||
#define ETL_MESSAGE_TIMER_ENABLE_INTERRUPTS
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP03)
|
||||
#define ETL_FUNCTION_FORCE_CPP03
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#define ETL_VARIANT_FORCE_CPP03
|
||||
#define ETL_VECTOR_FORCE_CPP03
|
||||
#define ETL_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03
|
||||
#define ETL_OPTIONAL_FORCE_CPP03
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03
|
||||
#define ETL_CRC_FORCE_CPP03
|
||||
#define ETL_MEM_CAST_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03
|
||||
#define ETL_FSM_FORCE_CPP03
|
||||
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -42,27 +42,27 @@ SOFTWARE.
|
||||
#define ETL_MESSAGE_TIMER_DISABLE_INTERRUPTS
|
||||
#define ETL_MESSAGE_TIMER_ENABLE_INTERRUPTS
|
||||
|
||||
#if defined(ETL_FORCE_TEST_CPP03)
|
||||
#define ETL_FUNCTION_FORCE_CPP03
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#define ETL_VARIANT_FORCE_CPP03
|
||||
#define ETL_VECTOR_FORCE_CPP03
|
||||
#define ETL_QUEUE_FORCE_CPP03
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03
|
||||
#define ETL_OPTIONAL_FORCE_CPP03
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03
|
||||
#define ETL_CRC_FORCE_CPP03
|
||||
#define ETL_MEM_CAST_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03
|
||||
#define ETL_OBSERVER_FORCE_CPP03
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03
|
||||
#define ETL_FSM_FORCE_CPP03
|
||||
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
|
||||
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -28,10 +28,10 @@ SOFTWARE.
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include "etl/delegate.h"
|
||||
#include "etl/private/delegate_cpp11.h"
|
||||
#include "etl/vector.h"
|
||||
|
||||
#if !defined(ETL_CRC_FORCE_CPP03)
|
||||
#if !defined(ETL_CRC_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -28,6 +28,8 @@ SOFTWARE.
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#define ETL_IN_DELEGATE_CPP03_UNIT_TEST
|
||||
|
||||
#include "etl/private/delegate_cpp03.h"
|
||||
#include "etl/vector.h"
|
||||
|
||||
@ -201,18 +203,18 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_is_valid_false)
|
||||
{
|
||||
etl::delegate<void, void> d;
|
||||
etl_cpp03::delegate<void(void)> d;
|
||||
|
||||
CHECK(!d.is_valid());
|
||||
CHECK(!d);
|
||||
|
||||
CHECK_THROW(d(), etl::delegate_uninitialised);
|
||||
CHECK_THROW(d(), etl_cpp03::delegate_uninitialised);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_free_void)
|
||||
{
|
||||
auto d = etl::delegate<void, void>::create<free_void>();
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<free_void>();
|
||||
|
||||
d();
|
||||
|
||||
@ -222,7 +224,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_free_int)
|
||||
{
|
||||
auto d = etl::delegate<void, int>::create<free_int>();
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<free_int>();
|
||||
|
||||
d(VALUE1);
|
||||
|
||||
@ -233,7 +235,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_free_reference)
|
||||
{
|
||||
auto d = etl::delegate<void, const Data&>::create<free_reference>();
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<free_reference>();
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -249,7 +251,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
etl::delegate<void, void> d(test);
|
||||
etl_cpp03::delegate<void(void)> d(test);
|
||||
|
||||
d();
|
||||
|
||||
@ -261,7 +263,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d = etl::delegate<void, void>::create(test);
|
||||
auto d = etl_cpp03::delegate<void(void)>::create(test);
|
||||
|
||||
d();
|
||||
|
||||
@ -273,7 +275,7 @@ namespace
|
||||
{
|
||||
const Test test;
|
||||
|
||||
etl::delegate<void, void> d(test);
|
||||
etl_cpp03::delegate<void(void)> d(test);
|
||||
|
||||
d();
|
||||
|
||||
@ -284,7 +286,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_operator_void_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, void>::create<Test, test_static>();
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<Test, test_static>();
|
||||
|
||||
d();
|
||||
|
||||
@ -294,7 +296,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_operator_void_compile_time_const)
|
||||
{
|
||||
auto d = etl::delegate<void, void>::create<const Test, const_test_static>();
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<const Test, const_test_static>();
|
||||
|
||||
d();
|
||||
|
||||
@ -307,7 +309,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
etl::delegate<void, void> d;
|
||||
etl_cpp03::delegate<void(void)> d;
|
||||
|
||||
d = test;
|
||||
|
||||
@ -321,7 +323,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d = etl::delegate<void, void>::create<Test, &Test::member_void>(test);
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<Test, &Test::member_void>(test);
|
||||
|
||||
d();
|
||||
|
||||
@ -333,7 +335,7 @@ namespace
|
||||
{
|
||||
const Test test;
|
||||
|
||||
auto d = etl::delegate<void, void>::create<Test, &Test::member_void_const>(test);
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<Test, &Test::member_void_const>(test);
|
||||
|
||||
d();
|
||||
|
||||
@ -345,7 +347,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d = etl::delegate<void, int>::create<Test, &Test::member_int>(test);
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int>(test);
|
||||
|
||||
d(VALUE1);
|
||||
|
||||
@ -358,7 +360,7 @@ namespace
|
||||
{
|
||||
const Test test;
|
||||
|
||||
auto d = etl::delegate<void, int>::create<Test, &Test::member_int_const>(test);
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int_const>(test);
|
||||
|
||||
d(VALUE1);
|
||||
|
||||
@ -370,7 +372,7 @@ namespace
|
||||
TEST_FIXTURE(SetupFixture, test_member_reference)
|
||||
{
|
||||
Test test;
|
||||
auto d = etl::delegate<void, const Data&>::create<Test, &Test::member_reference>(test);
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<Test, &Test::member_reference>(test);
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -385,7 +387,7 @@ namespace
|
||||
TEST_FIXTURE(SetupFixture, test_member_reference_const)
|
||||
{
|
||||
const Test test;
|
||||
auto d = etl::delegate<void, const Data&>::create<Test, &Test::member_reference_const>(test);
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<Test, &Test::member_reference_const>(test);
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -399,7 +401,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_static)
|
||||
{
|
||||
auto d = etl::delegate<void, const Data&>::create<Test::member_static>();
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<Test::member_static>();
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -414,7 +416,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_void_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, void>::create<Test, test_static, &Test::member_void>();
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<Test, test_static, &Test::member_void>();
|
||||
|
||||
d();
|
||||
|
||||
@ -424,7 +426,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_void_const_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, void>::create<Test, const_test_static, &Test::member_void_const>();
|
||||
auto d = etl_cpp03::delegate<void(void)>::create<Test, const_test_static, &Test::member_void_const>();
|
||||
|
||||
d();
|
||||
|
||||
@ -434,7 +436,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_int_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, int>::create<Test, test_static, &Test::member_int>();
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<Test, test_static, &Test::member_int>();
|
||||
|
||||
d(VALUE1);
|
||||
|
||||
@ -445,7 +447,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_int_const_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, int>::create<Test, const_test_static, &Test::member_int_const>();
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<Test, const_test_static, &Test::member_int_const>();
|
||||
|
||||
d(VALUE1);
|
||||
|
||||
@ -456,7 +458,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_reference_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, const Data&>::create<Test, test_static, &Test::member_reference>();
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<Test, test_static, &Test::member_reference>();
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -470,7 +472,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_member_reference_const_compile_time)
|
||||
{
|
||||
auto d = etl::delegate<void, const Data&>::create<Test, const_test_static, &Test::member_reference_const>();
|
||||
auto d = etl_cpp03::delegate<void(const Data&)>::create<Test, const_test_static, &Test::member_reference_const>();
|
||||
|
||||
Data data;
|
||||
data.d = VALUE1;
|
||||
@ -484,7 +486,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_set_free_int)
|
||||
{
|
||||
etl::delegate<void, int> d;
|
||||
etl_cpp03::delegate<void(int)> d;
|
||||
|
||||
d.set<free_int>();
|
||||
|
||||
@ -497,7 +499,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_set_lambda_int)
|
||||
{
|
||||
etl::delegate<void, int> d;
|
||||
etl_cpp03::delegate<void(int)> d;
|
||||
|
||||
d.set([](int i) { function_called = true; parameter_correct = (i == VALUE1); });
|
||||
|
||||
@ -511,7 +513,7 @@ namespace
|
||||
TEST_FIXTURE(SetupFixture, test_set_member_reference)
|
||||
{
|
||||
Test test;
|
||||
etl::delegate<void, const Data&> d;
|
||||
etl_cpp03::delegate<void(const Data&)> d;
|
||||
|
||||
d.set<Test, &Test::member_reference>(test);
|
||||
|
||||
@ -528,7 +530,7 @@ namespace
|
||||
TEST_FIXTURE(SetupFixture, test_set_const_member_reference)
|
||||
{
|
||||
Test test;
|
||||
etl::delegate<void, const Data&> d;
|
||||
etl_cpp03::delegate<void(const Data&)> d;
|
||||
|
||||
d.set<Test, &Test::member_reference_const>(test);
|
||||
|
||||
@ -544,7 +546,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_set_member_reference_compile_time)
|
||||
{
|
||||
etl::delegate<void, const Data&> d;
|
||||
etl_cpp03::delegate<void(const Data&)> d;
|
||||
|
||||
d.set<Test, test_static, &Test::member_reference>();
|
||||
|
||||
@ -560,7 +562,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_set_member_reference_const_compile_time)
|
||||
{
|
||||
etl::delegate<void, const Data&> d;
|
||||
etl_cpp03::delegate<void(const Data&)> d;
|
||||
|
||||
d.set<Test, const_test_static, &Test::member_reference_const>();
|
||||
|
||||
@ -579,7 +581,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d1 = etl::delegate<void, int>::create<Test, &Test::member_int>(test);
|
||||
auto d1 = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int>(test);
|
||||
auto d2(d1);
|
||||
|
||||
d2(VALUE1);
|
||||
@ -593,8 +595,8 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d1 = etl::delegate<void, int>::create<Test, &Test::member_int>(test);
|
||||
etl::delegate<void, int> d2;
|
||||
auto d1 = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int>(test);
|
||||
etl_cpp03::delegate<void(int)> d2;
|
||||
|
||||
d2 = d1;
|
||||
|
||||
@ -609,7 +611,7 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d1 = etl::delegate<void, int>::create<Test, &Test::member_int>(test);
|
||||
auto d1 = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int>(test);
|
||||
auto d2 = d1;
|
||||
|
||||
CHECK(d1 == d2);
|
||||
@ -620,8 +622,8 @@ namespace
|
||||
{
|
||||
Test test;
|
||||
|
||||
auto d1 = etl::delegate<void, int>::create<Test, &Test::member_int>(test);
|
||||
auto d2 = etl::delegate<void, int>::create<Test, &Test::member_int_const>(test);;
|
||||
auto d1 = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int>(test);
|
||||
auto d2 = etl_cpp03::delegate<void(int)>::create<Test, &Test::member_int_const>(test);;
|
||||
|
||||
CHECK(d1 != d2);
|
||||
}
|
||||
@ -629,9 +631,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_issue_418)
|
||||
{
|
||||
etl::vector<etl::delegate<int, int>, 5> vector_of_delegates;
|
||||
etl::vector<etl_cpp03::delegate<int(int)>, 5> vector_of_delegates;
|
||||
|
||||
vector_of_delegates.push_back(etl::delegate<int, int>::create<times_2>());
|
||||
vector_of_delegates.push_back(etl_cpp03::delegate<int(int)>::create<times_2>());
|
||||
|
||||
CHECK_EQUAL(42, vector_of_delegates.front()(21));
|
||||
}
|
||||
@ -639,7 +641,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_or_run_time_normal)
|
||||
{
|
||||
auto d = etl::delegate<int, int>::create<normal>();
|
||||
etl_cpp03::delegate<int(int)> d = etl_cpp03::delegate<int(int)>::create<normal>();
|
||||
|
||||
int result = d.call_or(alternative, VALUE1);
|
||||
|
||||
@ -649,7 +651,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_or_run_time_alternative)
|
||||
{
|
||||
etl::delegate<int, int> d;
|
||||
etl_cpp03::delegate<int(int)> d;
|
||||
|
||||
int result = d.call_or(alternative, VALUE1);
|
||||
|
||||
@ -659,7 +661,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_or_compile_time_alternative)
|
||||
{
|
||||
etl::delegate<int, int> d;
|
||||
etl_cpp03::delegate<int(int)> d;
|
||||
|
||||
int result = d.call_or<alternative>(VALUE1);
|
||||
|
||||
@ -669,9 +671,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_or_delegate_alternative)
|
||||
{
|
||||
etl::delegate<int, int> d;
|
||||
etl_cpp03::delegate<int(int)> d;
|
||||
|
||||
auto alt = etl::delegate<int, int>::create<alternative>();
|
||||
auto alt = etl_cpp03::delegate<int(int)>::create<alternative>();
|
||||
|
||||
int result = d.call_or(alt, VALUE1);
|
||||
|
||||
@ -681,7 +683,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_if_and_valid)
|
||||
{
|
||||
auto d = etl::delegate<int, int>::create<normal>();
|
||||
auto d = etl_cpp03::delegate<int(int)>::create<normal>();
|
||||
|
||||
etl::optional<int> result = d.call_if(VALUE1);
|
||||
|
||||
@ -692,7 +694,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_if_and_not_valid)
|
||||
{
|
||||
etl::delegate<int, int> d;
|
||||
etl_cpp03::delegate<int(int)> d;
|
||||
|
||||
etl::optional<int> result = d.call_if(VALUE1);
|
||||
|
||||
@ -702,7 +704,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_if_and_valid_returning_void)
|
||||
{
|
||||
auto d = etl::delegate<void, int>::create<normal_returning_void>();
|
||||
auto d = etl_cpp03::delegate<void(int)>::create<normal_returning_void>();
|
||||
|
||||
bool was_called = d.call_if(VALUE1);
|
||||
|
||||
@ -714,7 +716,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_call_if_and_not_valid_returning_void)
|
||||
{
|
||||
etl::delegate<void, int> d;
|
||||
etl_cpp03::delegate<void(int)> d;
|
||||
|
||||
bool was_called = d.call_if(VALUE1);
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ SOFTWARE.
|
||||
#include "etl/delegate.h"
|
||||
#include "etl/delegate_service.h"
|
||||
|
||||
#if !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
#if !defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ SOFTWARE.
|
||||
#include "etl/delegate.h"
|
||||
#include "etl/delegate_service.h"
|
||||
|
||||
#if !defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
#if !defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ SOFTWARE.
|
||||
#include "etl/delegate.h"
|
||||
#include "etl/delegate_service.h"
|
||||
|
||||
#if defined(ETL_DELEGATE_FORCE_CPP03)
|
||||
#if defined(ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION)
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -73,7 +73,7 @@ namespace
|
||||
public:
|
||||
|
||||
Test()
|
||||
: callback(etl::delegate<void, size_t>::create<Test, &Test::member1>(*this))
|
||||
: callback(Service::delegate_type::create<Test, &Test::member1>(*this))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -845,7 +845,7 @@ namespace
|
||||
// So this is only tested on C++11 onwards
|
||||
TEST_FIXTURE(SetupFixture, test_emplace_back_non_const_references)
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
class Data
|
||||
{
|
||||
public:
|
||||
|
||||
@ -55,7 +55,7 @@ namespace
|
||||
CHECK(type);
|
||||
}
|
||||
|
||||
#if !defined(ETL_LARGEST_TYPE_FORCE_CPP03)
|
||||
#if !defined(ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_pod_type_vt)
|
||||
{
|
||||
@ -99,7 +99,7 @@ namespace
|
||||
CHECK(type);
|
||||
}
|
||||
|
||||
#if !defined(ETL_LARGEST_TYPE_FORCE_CPP03)
|
||||
#if !defined(ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_non_pod_type_vt)
|
||||
{
|
||||
|
||||
@ -153,7 +153,7 @@ namespace
|
||||
CHECK(!queue.pop(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -165,7 +165,7 @@ namespace
|
||||
CHECK(!queue.pop(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -150,7 +150,7 @@ namespace
|
||||
CHECK(!queue.pop(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -155,7 +155,7 @@ namespace
|
||||
CHECK(!queue.pop(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -241,7 +241,7 @@ namespace
|
||||
CHECK(!queue.pop_from_unlocked(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -245,7 +245,7 @@ namespace
|
||||
CHECK(!queue.pop_from_unlocked(i));
|
||||
}
|
||||
|
||||
#if !defined(ETL_FORCE_TEST_CPP03)
|
||||
#if !defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_move_push_pop)
|
||||
{
|
||||
|
||||
@ -134,7 +134,7 @@ namespace
|
||||
CHECK((etl::is_same<Type16, typename Type_Id_Lookup16::type_from_id<Type16::ID>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_id_t_16)
|
||||
{
|
||||
@ -170,7 +170,7 @@ namespace
|
||||
CHECK((etl::is_same<Type16, typename Type_Id_Lookup8::type_from_id<Type16::ID>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_id_t_8)
|
||||
{
|
||||
@ -191,7 +191,7 @@ namespace
|
||||
CHECK((etl::is_same<Type16, typename Type_Id_Lookup1::type_from_id<Type16::ID>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_id_t_1)
|
||||
{
|
||||
@ -253,7 +253,7 @@ namespace
|
||||
CHECK_EQUAL((unsigned int)Type16::ID, (unsigned int)Type_Id_Lookup16::get_id_from_type(Type16()));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_id_from_type_v_16)
|
||||
{
|
||||
@ -306,7 +306,7 @@ namespace
|
||||
CHECK_EQUAL((unsigned int)Type16::ID, (unsigned int)Type_Id_Lookup8::get_id_from_type(Type16()));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_id_from_type_v_8)
|
||||
{
|
||||
@ -330,7 +330,7 @@ namespace
|
||||
CHECK_EQUAL((unsigned int)Type16::ID, (unsigned int)Type_Id_Lookup1::get_id_from_type(Type16()));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_id_from_type_v_1)
|
||||
{
|
||||
@ -359,7 +359,7 @@ namespace
|
||||
CHECK((etl::is_same<Type15, typename Type_Type_Lookup16::type_from_type<Type16>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_type_t_16)
|
||||
{
|
||||
@ -395,7 +395,7 @@ namespace
|
||||
CHECK((etl::is_same<Type7, typename Type_Type_Lookup8::type_from_type<Type8>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_type_t_8)
|
||||
{
|
||||
@ -416,7 +416,7 @@ namespace
|
||||
CHECK((etl::is_same<Type2, typename Type_Type_Lookup1::type_from_type<Type1>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_type_t_1)
|
||||
{
|
||||
|
||||
@ -54,7 +54,7 @@ namespace
|
||||
CHECK(!(etl::is_same<etl::null_type<99>, typename Types1::select<0>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_select_t_1)
|
||||
{
|
||||
@ -84,7 +84,7 @@ namespace
|
||||
CHECK(!(etl::is_same<etl::null_type<99>, typename Types8::select<7>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_select_t_8)
|
||||
{
|
||||
@ -144,7 +144,7 @@ namespace
|
||||
CHECK(!(etl::is_same<etl::null_type<99>, typename Types16::select<15>::type>::value));
|
||||
}
|
||||
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03)
|
||||
#if !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
|
||||
//*************************************************************************
|
||||
TEST(test_type_select_t_16)
|
||||
{
|
||||
|
||||
@ -824,7 +824,7 @@ namespace
|
||||
// So this is only tested on C++11 onwards
|
||||
TEST_FIXTURE(SetupFixture, test_emplace_back_non_const_references)
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && !defined(ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION)
|
||||
class Data
|
||||
{
|
||||
public:
|
||||
|
||||
@ -774,7 +774,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_FORCE_TEST_CPP03;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_FORCE_TEST_CPP03_IMPLEMENTATION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../unittest-cpp/;../../include;../../test</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user