EasyAssert.h 429 字节
Newer Older
1 2 3 4 5 6 7 8
#pragma once
#include <string_view>
#include <stdio.h>
#include <stdlib.h>

/* Paste this on the file you want to debug. */

namespace milvus::impl {
9 10 11
void
EasyAssertInfo(
    bool value, std::string_view expr_str, std::string_view filename, int lineno, std::string_view extra_info);
12 13 14 15
}

#define AssertInfo(expr, info) impl::EasyAssertInfo(bool(expr), #expr, __FILE__, __LINE__, (info))
#define Assert(expr) AssertInfo((expr), "")