-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
757 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef YOREL_YOMM2_DETAIL_TYPES_HPP | ||
#define YOREL_YOMM2_DETAIL_TYPES_HPP | ||
|
||
#include <cstdint> | ||
#include <limits> | ||
|
||
#if defined(YOMM2_SHARED) | ||
#if defined(_MSC_VER) | ||
#if !defined(yOMM2_API_msc) | ||
#define yOMM2_API_msc __declspec(dllimport) | ||
#endif | ||
#endif | ||
#endif | ||
|
||
#if !defined(yOMM2_API_gcc) | ||
#define yOMM2_API_gcc | ||
#endif | ||
|
||
#if !defined(yOMM2_API_msc) | ||
#define yOMM2_API_msc | ||
#endif | ||
|
||
#define yOMM2_API yOMM2_API_gcc yOMM2_API_msc | ||
|
||
namespace yorel { | ||
namespace yomm2 { | ||
|
||
using type_id = std::uintptr_t; | ||
constexpr type_id invalid_type = (std::numeric_limits<type_id>::max)(); | ||
|
||
namespace detail { | ||
|
||
template<typename... Types> | ||
struct types; | ||
|
||
} | ||
} // namespace yomm2 | ||
} // namespace yorel | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
// Copyright (c) 2018-2024 Jean-Louis Leroy | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt | ||
// or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#ifndef YOREL_YOMM2_POLICY_BASIC_ERROR_OUTPUT_HPP | ||
#define YOREL_YOMM2_POLICY_BASIC_ERROR_OUTPUT_HPP | ||
|
||
#include <yorel/yomm2/policies/core.hpp> | ||
|
||
namespace yorel { | ||
namespace yomm2 { | ||
namespace policy { | ||
|
||
template<class Policy, typename Stream = detail::ostderr> | ||
struct yOMM2_API_gcc basic_error_output : virtual error_output { | ||
static Stream error_stream; | ||
}; | ||
|
||
template<class Policy, typename Stream> | ||
Stream basic_error_output<Policy, Stream>::error_stream; | ||
|
||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
// Copyright (c) 2018-2024 Jean-Louis Leroy | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt | ||
// or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#ifndef YOREL_YOMM2_POLICY_BASIC_INDIRECT_VPTR_HPP | ||
#define YOREL_YOMM2_POLICY_BASIC_INDIRECT_VPTR_HPP | ||
|
||
#include <yorel/yomm2/policies/core.hpp> | ||
|
||
namespace yorel { | ||
namespace yomm2 { | ||
namespace policy { | ||
|
||
template<class Policy> | ||
struct yOMM2_API_gcc basic_indirect_vptr : virtual indirect_vptr { | ||
static std::vector<std::uintptr_t const* const*> indirect_vptrs; | ||
}; | ||
|
||
template<class Policy> | ||
std::vector<std::uintptr_t const* const*> | ||
basic_indirect_vptr<Policy>::indirect_vptrs; | ||
|
||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
// Copyright (c) 2018-2024 Jean-Louis Leroy | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt | ||
// or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#ifndef YOREL_YOMM2_POLICY_BASIC_TRACE_OUTPUT_HPP | ||
#define YOREL_YOMM2_POLICY_BASIC_TRACE_OUTPUT_HPP | ||
|
||
#include <yorel/yomm2/policies/core.hpp> | ||
|
||
namespace yorel { | ||
namespace yomm2 { | ||
namespace policy { | ||
|
||
template<class Policy, typename Stream = detail::ostderr> | ||
struct yOMM2_API_gcc basic_trace_output : virtual trace_output { | ||
static Stream trace_stream; | ||
static bool trace_enabled; | ||
}; | ||
|
||
template<class Policy, typename Stream> | ||
Stream basic_trace_output<Policy, Stream>::trace_stream; | ||
|
||
template<class Policy, typename Stream> | ||
bool basic_trace_output<Policy, Stream>::trace_enabled([]() { | ||
auto env = getenv("YOMM2_TRACE"); | ||
return env && *env++ == '1' && *env++ == 0; | ||
}()); | ||
|
||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.