pocketpy/3rd/numpy/include/xtl/xtl_config.hpp
Anurag Bhat b2bbd09263
Merge a numpy compatible with v1.x (#305)
* Add numpy

* Some refactor
2024-09-06 13:05:01 +08:00

45 lines
1.4 KiB
C++

/***************************************************************************
* Copyright (c) Johan Mabille, Sylvain Corlay and Wolf Vollprecht *
* Copyright (c) QuantStack *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
#ifndef XTL_CONFIG_HPP
#define XTL_CONFIG_HPP
#define XTL_VERSION_MAJOR 0
#define XTL_VERSION_MINOR 7
#define XTL_VERSION_PATCH 7
#ifndef __has_feature
#define __has_feature(x) 0
#endif
// Attempt to discover whether we're being compiled with exception support
#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(XTL_NO_EXCEPTIONS)
// Exceptions are enabled.
#else
#if !defined(XTL_NO_EXCEPTIONS)
// Exceptions are disabled.
#define XTL_NO_EXCEPTIONS
#endif
#endif
#if defined(XTL_NO_EXCEPTIONS)
#include <iostream>
#define XTL_THROW(_, msg) \
{ \
std::cerr << msg << std::endl; \
std::abort(); \
}
#else
#define XTL_THROW(exception, msg) throw exception(msg)
#endif
#endif