Files
revng-revng/ptcinterface.h
T
Pietro Fezzardi 5d9aa31c50 Remove useless type GenericFunctor
`GenericFunctor` is substituted with the `std::integral_constant`
template. This also allows us to remove code that requires C++14.

It also removes the now useless cmake tests on the compiler flag
`-Wno-error=noexcept-type` that was introduced to disable fatal warnings
on the type `GenericFunctor`.
Now that this type has been removed the check is not necessary anymore,
because the `std::integral_constant` template used now does not cause
the warning.
So we can go back to enabling the fatal warnings.
2018-01-18 18:21:33 +01:00

26 lines
628 B
C++

#ifndef _PTCINTERFACE_H
#define _PTCINTERFACE_H
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
// Standard includes
#include <memory>
#include <type_traits>
// Local includes
#include "revamb.h"
#define USE_DYNAMIC_PTC
#include "ptc.h"
using PTCInstructionListDestructor =
std::integral_constant<decltype(&ptc_instruction_list_free),
&ptc_instruction_list_free>;
using PTCInstructionListPtr = std::unique_ptr<PTCInstructionList,
PTCInstructionListDestructor>;
extern PTCInterface ptc;
#endif // _PTCINTERFACE_H