src: add boost-pfr
This commit is contained in:
+28
@@ -778,6 +778,34 @@ unsigned membuffer_get_size(MemBuffer &mb);
|
||||
//#define DOCTEST_CONFIG_DISABLE 1
|
||||
#include <doctest/doctest/parts/doctest_fwd.h>
|
||||
|
||||
#if WITH_BOOST_PFR
|
||||
#include <boost/pfr/io.hpp>
|
||||
template <class A>
|
||||
__acc_noinline std::string pfr_str(const A &a) {
|
||||
std::ostringstream ss;
|
||||
ss << boost::pfr::io(a);
|
||||
return ss.str();
|
||||
}
|
||||
template <class A, class B>
|
||||
__acc_noinline std::string pfr_str(const A &a, const B &b) {
|
||||
std::ostringstream ss;
|
||||
ss << boost::pfr::io(a);
|
||||
ss << ' ';
|
||||
ss << boost::pfr::io(b);
|
||||
return ss.str();
|
||||
}
|
||||
template <class A, class B, class C>
|
||||
__acc_noinline std::string pfr_str(const A &a, const B &b, const C &c) {
|
||||
std::ostringstream ss;
|
||||
ss << boost::pfr::io(a);
|
||||
ss << ' ';
|
||||
ss << boost::pfr::io(b);
|
||||
ss << ' ';
|
||||
ss << boost::pfr::io(c);
|
||||
return ss.str();
|
||||
}
|
||||
#endif // WITH_BOOST_PFR
|
||||
|
||||
// util/dt_check.cpp
|
||||
void upx_compiler_sanity_check();
|
||||
int upx_doctest_check();
|
||||
|
||||
Reference in New Issue
Block a user