#include "cpr/redirect.h" namespace cpr { PostRedirectFlags operator|(PostRedirectFlags lhs, PostRedirectFlags rhs) { return static_cast(static_cast(lhs) | static_cast(rhs)); } PostRedirectFlags operator&(PostRedirectFlags lhs, PostRedirectFlags rhs) { return static_cast(static_cast(lhs) & static_cast(rhs)); } PostRedirectFlags operator^(PostRedirectFlags lhs, PostRedirectFlags rhs) { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } PostRedirectFlags operator~(PostRedirectFlags flag) { return static_cast(~static_cast(flag)); } PostRedirectFlags& operator|=(PostRedirectFlags& lhs, PostRedirectFlags rhs) { lhs = static_cast(static_cast(lhs) | static_cast(rhs)); const uint8_t tmp = static_cast(lhs); lhs = static_cast(tmp); return lhs; } PostRedirectFlags& operator&=(PostRedirectFlags& lhs, PostRedirectFlags rhs) { lhs = static_cast(static_cast(lhs) & static_cast(rhs)); return lhs; } PostRedirectFlags& operator^=(PostRedirectFlags& lhs, PostRedirectFlags rhs) { lhs = static_cast(static_cast(lhs) ^ static_cast(rhs)); return lhs; } bool any(PostRedirectFlags flag) { return flag != PostRedirectFlags::NONE; } } // namespace cpr