Files
pva2pva/p2pApp/helper.h
Michael Davidsaver 943247f0f0 remove g++ or c++11 requirement
^#$*&#$ MSVC
2017-11-01 10:04:36 -05:00

20 lines
372 B
C++

#ifndef HELPER_H
#define HELPER_H
#include <memory>
#define FOREACH(ITERTYPE, IT,END,C) for(ITERTYPE IT=(C).begin(), END=(C).end(); IT!=END; ++IT)
namespace p2p {
#if __cplusplus>=201103L
template<typename T>
using auto_ptr = std::unique_ptr<T>;
#define PTRMOVE(AUTO) std::move(AUTO)
#else
using std::auto_ptr;
#define PTRMOVE(AUTO) (AUTO)
#endif
}
#endif // HELPER_H