From 93b3e2b30dd04d688990ad08543565e4205f3a46 Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Thu, 6 Jun 2024 16:38:18 +0200 Subject: [PATCH] tanuki update, require heyoka 5. --- CMakeLists.txt | 2 +- include/kep3/detail/tanuki.hpp | 1573 -------------------------------- include/kep3/planet.hpp | 114 +-- src/planet.cpp | 18 + 4 files changed, 66 insertions(+), 1641 deletions(-) delete mode 100644 include/kep3/detail/tanuki.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b934bdea..dbec63b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,7 @@ if(${fmt_VERSION_MAJOR} LESS 10) endif() # heyoka. -find_package(heyoka 3.0.0 REQUIRED CONFIG) +find_package(heyoka 5.0.0 REQUIRED CONFIG) target_link_libraries(kep3 PUBLIC heyoka::heyoka) # spdlog. diff --git a/include/kep3/detail/tanuki.hpp b/include/kep3/detail/tanuki.hpp deleted file mode 100644 index c80414a9..00000000 --- a/include/kep3/detail/tanuki.hpp +++ /dev/null @@ -1,1573 +0,0 @@ -// Copyright 2023 Francesco Biscani (bluescarni@gmail.com) -// -// This file is part of the tanuki library. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef TANUKI_TANUKI_HPP -#define TANUKI_TANUKI_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(TANUKI_WITH_BOOST_S11N) - -#include -#include -#include -#include -#include -#include -#include - -#endif - -// Versioning. -#define TANUKI_VERSION_MAJOR 1 -#define TANUKI_VERSION_MINOR 0 -#define TANUKI_VERSION_PATCH 0 -#define TANUKI_ABI_VERSION 1 - -// NOTE: indirection to allow token pasting/stringification: -// https://stackoverflow.com/questions/24991208/expand-a-macro-in-a-macro -#define TANUKI_VERSION_STRING__(maj, min, pat) #maj "." #min "." #pat -#define TANUKI_VERSION_STRING_(maj, min, pat) TANUKI_VERSION_STRING__(maj, min, pat) -#define TANUKI_VERSION_STRING TANUKI_VERSION_STRING_(TANUKI_VERSION_MAJOR, TANUKI_VERSION_MINOR, TANUKI_VERSION_PATCH) - -// No unique address setup. -#if defined(_MSC_VER) - -#define TANUKI_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] - -#else - -#define TANUKI_NO_UNIQUE_ADDRESS [[no_unique_address]] - -#endif - -// ABI tag setup. -#if defined(__GNUC__) || defined(__clang__) - -#define TANUKI_ABI_TAG_ATTR __attribute__((abi_tag)) - -#else - -#define TANUKI_ABI_TAG_ATTR - -#endif - -#define TANUKI_BEGIN_NAMESPACE__(abiver) \ - namespace tanuki \ - { \ - inline namespace v##abiver TANUKI_ABI_TAG_ATTR \ - { - -#define TANUKI_BEGIN_NAMESPACE_(abiver) TANUKI_BEGIN_NAMESPACE__(abiver) - -#define TANUKI_BEGIN_NAMESPACE TANUKI_BEGIN_NAMESPACE_(TANUKI_ABI_VERSION) - -#define TANUKI_END_NAMESPACE \ - } \ - } - -// Clang concept bugs. -// NOTE: perhaps we can put more specific version checking -// here once we figure out exactly which versions work ok. -#if defined(__clang__) - -#define TANUKI_CLANG_BUGGY_CONCEPTS - -#endif - -#if defined(__GNUC__) - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-align" - -#endif - -// Visibility setup. -// NOTE: the idea here is as follows: -// - on Windows there is apparently no need to set up -// dllimport/dllexport on class templates; -// - on non-Windows platforms with known compilers, -// we mark several class templates as visible. This is apparently -// necessary at least in some situations involving, for -// instance, the export/registration macros in Boost -// serialisation. libc++ also, for instance, usually marks -// public class templates as visible; -// - otherwise, we do not implement any visibility attribute. -#if defined(_WIN32) || defined(__CYGWIN__) - -#define TANUKI_VISIBLE - -#elif defined(__clang__) || defined(__GNUC__) || defined(__INTEL_COMPILER) - -#define TANUKI_VISIBLE __attribute__((visibility("default"))) - -#else - -#define TANUKI_VISIBLE - -#endif - -TANUKI_BEGIN_NAMESPACE - -namespace detail -{ - -#if defined(TANUKI_CLANG_BUGGY_CONCEPTS) - -// NOTE: we employ the detection idiom in order to work -// around certain bugs in clang's concepts implementation. - -// http://en.cppreference.com/w/cpp/experimental/is_detected -template class Op, class... Args> -struct detector { - using value_t = std::false_type; - using type = Default; -}; - -struct nonesuch { - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const &) = delete; - nonesuch(nonesuch &&) noexcept = delete; - nonesuch &operator=(nonesuch const &) = delete; - nonesuch &operator=(nonesuch &&) noexcept = delete; -}; - -template class Op, class... Args> -struct detector>, Op, Args...> { - using value_t = std::true_type; - using type = Op; -}; - -template