From 70a90b4ae07d5dab739f773bf6c4cac05338eb39 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 10 Sep 2019 18:59:23 +0200 Subject: [PATCH] config.h support removed as it causes issues with compiler-explorer --- cmake/check_features.cmake | 30 ------------------------------ src/CMakeLists.txt | 4 ---- src/include/units/bits/hacks.h | 12 ------------ 3 files changed, 46 deletions(-) delete mode 100644 cmake/check_features.cmake diff --git a/cmake/check_features.cmake b/cmake/check_features.cmake deleted file mode 100644 index f0c66010..00000000 --- a/cmake/check_features.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2018 Mateusz Pusz -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -set(CMAKE_REQUIRED_FLAGS -std=c++2a) - -include(CheckTypeSize) - -set(CMAKE_EXTRA_INCLUDE_FILES type_traits) -check_type_size("std::type_identity" UNITS_HAS_STD_TYPE_IDENTITY LANGUAGE CXX) - -configure_file(../cmake/config.h.in include/units/bits/config.h) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 65beb501..759d2568 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,9 +34,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") # include common tools and workarounds include(common/cmake/tools) -# check availability of C++20 features -include(check_features) - # library definition add_library(units INTERFACE) #target_sources(units INTERFACE @@ -62,7 +59,6 @@ target_link_libraries(units target_include_directories(units INTERFACE $ - $ $ ) target_compile_options(units diff --git a/src/include/units/bits/hacks.h b/src/include/units/bits/hacks.h index bf5cb104..84231ecc 100644 --- a/src/include/units/bits/hacks.h +++ b/src/include/units/bits/hacks.h @@ -22,22 +22,10 @@ #pragma once -#include #include namespace std { -#ifndef UNITS_HAS_STD_TYPE_IDENTITY - - // type_identity - template - struct type_identity { using type = T; }; - - template - using type_identity_t = typename type_identity::type; - -#endif // UNITS_HAS_STD_TYPE_IDENTITY - // concepts using experimental::ranges::same_as; using experimental::ranges::derived_from;