10#ifndef OCL_FREESTANDING
11#include <boost/config.hpp>
12#include <boost/core/addressof.hpp>
13#include <boost/core/nvp.hpp>
14#include <boost/core/demangle.hpp>
15#include <boost/core/null_deleter.hpp>
16#include <boost/container/allocator.hpp>
17#include <boost/assert/source_location.hpp>
18#include <boost/assert.hpp>
19#include <boost/utility/string_view.hpp>
20#include <boost/config.hpp>
23#ifndef __attribute_packed__
24#define __attribute_packed__ __attribute__((packed))
28#define __ocl_packed__ __attribute_packed__
31#include <ocl/compat/core/ant_os.hpp>
32#include <ocl/compat/core/ne_system.hpp>
33#include <ocl/compat/core/win_nt.hpp>
34#include <ocl/compat/core/posix.hpp>
36#define OCL_DEPRECATED() [[deprecated]]
37#define OCL_DEPRECATED_MSG(MSG) [[deprecated(MSG)]]
39#if 202002L > __cplusplus
40#error !! OCL.Core works with C++20 and greater !!
44#define OCL_DECL extern "C"
47#define OCL_EXPORT_DECL OCL_DECL __attribute__((visibility("default")))
49#define OCL_EXPORT_DECL OCL_DECL declspec(dllexport)
54#define OCL_EXPORT_DECL
56#define OCL_EXPORT_DECL OCL_DECL declspec(dllimport)
61#define OCL_USE_CRLF_ENDINGS 1
65#if OCL_WANTS_PRAGMA_ONCE
66#define OCL_HAS_PRAGMA_ONCE 1
69#define OCL_CORE_MODULE (202606)
71#define OCL_PLACEHOLDER_PREFIX "${"
72#define OCL_PLACEHOLDER_SUFFIX "}"
80 inline void throw_runtime_error(::boost::source_location
const& loc = BOOST_CURRENT_LOCATION)
82 ::boost::throw_exception(std::runtime_error(
""), loc);
87 namespace placeholders
90 inline std::string find_and_replace(
const std::string& input,
91 const std::string& new_val,
92 const std::string& name)
94 if (input.find(OCL_PLACEHOLDER_PREFIX + name + OCL_PLACEHOLDER_SUFFIX) == std::string::npos)
97 std::string replacement = input;
98 replacement.replace(input.find(OCL_PLACEHOLDER_PREFIX + name + OCL_PLACEHOLDER_SUFFIX),
99 std::string(OCL_PLACEHOLDER_PREFIX + name + OCL_PLACEHOLDER_SUFFIX).size(),
Memory allocator for OCL support.
Definition allocator_fwd.hpp:16