Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/type_traits.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ contains a few things from the standard:
* https://en.cppreference.com/w/cpp/types/conditional[`conditional_t`]
(implemented with fewer template instantiations than a typical standard
implementation)
* https://en.cppreference.com/w/cpp/types/is_constant_evaluated[`is_constant_evaluated`] (from C++20)
* https://en.cppreference.com/w/cpp/types/is_function[`is_function_v`] (implemented with Walter Brown's method)
* https://en.cppreference.com/w/cpp/types/is_scoped_enum[`is_scoped_enum_v`] (from C++23)
* https://en.cppreference.com/w/cpp/utility/to_underlying[`to_underlying`] (from C++23)
* https://en.cppreference.com/w/cpp/types/type_identity[`type_identity`] (from C++20)

Expand Down
2 changes: 1 addition & 1 deletion include/stdx/tuple.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdx/concepts.hpp>
#include <stdx/ct_conversions.hpp>
#include <stdx/type_traits.hpp>
#include <stdx/udls.hpp>
#include <stdx/utility.hpp>
Expand All @@ -27,7 +28,6 @@ template <typename> struct tag_constant;
template <typename T> constexpr static tag_constant<T> *tag{};

namespace error {
template <typename...> constexpr auto always_false_v = false;
template <typename T> struct type_from_tag_constant {
using type = T;
};
Expand Down
10 changes: 0 additions & 10 deletions include/stdx/type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ constexpr bool is_function_object_v = detail::is_func_obj<T>;
template <typename T>
constexpr bool is_callable_v = is_function_v<T> or is_function_object_v<T>;

constexpr auto is_constant_evaluated() noexcept -> bool {
return __builtin_is_constant_evaluated();
}

template <typename T> struct type_identity {
using type = T;
};
Expand Down Expand Up @@ -115,12 +111,6 @@ constexpr auto is_specialization_of()
return {};
}

template <typename E>
constexpr bool is_scoped_enum_v =
std::is_enum_v<E> and not std::is_convertible_v<E, underlying_type_t<E>>;
template <typename E>
using is_scoped_enum = std::bool_constant<is_scoped_enum_v<E>>;

template <typename...> struct type_list {};
template <auto...> struct value_list {};

Expand Down
1 change: 0 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ add_tests(
intrusive_forward_list
intrusive_list
intrusive_list_properties
is_constant_evaluated
iterator
latched
numeric
Expand Down
23 changes: 0 additions & 23 deletions test/is_constant_evaluated.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions test/type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ TEST_CASE("derived types are not specializations (value templates)",
not stdx::is_specialization_of<value_derived_t<0>, value_unary_t>());
}

namespace {
enum E1 {};
enum struct E2 {};
} // namespace

TEST_CASE("is_scoped_enum", "[type_traits]") {
STATIC_REQUIRE(not stdx::is_scoped_enum_v<int>);
STATIC_REQUIRE(not stdx::is_scoped_enum_v<E1>);
STATIC_REQUIRE(stdx::is_scoped_enum_v<E2>);

STATIC_REQUIRE(not stdx::is_scoped_enum<int>::value);
STATIC_REQUIRE(not stdx::is_scoped_enum<E1>::value);
STATIC_REQUIRE(stdx::is_scoped_enum<E2>::value);
}

TEST_CASE("type_identity", "[type_traits]") {
STATIC_REQUIRE(std::is_same_v<stdx::type_identity_t<void>, void>);
}
Expand Down