29 #include <type_traits> 33 #define REQUIRE XERUS_REQUIRE 34 #define CHECK XERUS_CHECK 35 #define IF_CHECK XERUS_IF_CHECK 36 #define IF_NO_CHECK XERUS_IF_NO_CHECK 37 #define INTERNAL_CHECK XERUS_INTERNAL_CHECK 39 #define LOG_SHORT XERUS_LOG_SHORT 40 #define LOG_ONCE XERUS_LOG_ONCE 41 #define IS_LOGGING XERUS_IS_LOGGING 42 #define SET_LOGGING XERUS_SET_LOGGING 47 #if !defined(__cplusplus) || __cplusplus < 201402L 48 template<
typename T,
typename... Args>
50 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
55 using ::xerus::misc::operator<<;
59 template<
class IteratorType,
60 typename std::enable_if<
61 std::is_same<typename std::iterator_traits<IteratorType>::difference_type,
long>::value
62 && std::is_class<IteratorType>::value
64 IteratorType operator+(
const IteratorType& _iterator,
const size_t _add) {
65 IteratorType itr = _iterator;
66 std::advance(itr, _add);
72 template<
template<
class,
class...>
class container_t,
class item_t,
class... rest_t>
73 container_t<item_t, rest_t...> operator |(
const container_t<item_t, rest_t...> & _left,
const container_t<item_t, rest_t...> & _right) {
74 container_t<item_t, rest_t...> both(_left);
75 both.insert(both.end(), _right.begin(), _right.end());
Header file for the standard container to standard ostream operators.
std::unique_ptr< T > make_unique(Args &&... args)