Skip to content

Commit

Permalink
8299395: Remove metaprogramming/removeCV.hpp
Browse files Browse the repository at this point in the history
Reviewed-by: kbarrett, tschatzl
  • Loading branch information
jcking authored and Thomas Schatzl committed Jan 3, 2023
1 parent 3757433 commit 8afd665
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 134 deletions.
5 changes: 3 additions & 2 deletions src/hotspot/share/metaprogramming/decay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@
#define SHARE_METAPROGRAMMING_DECAY_HPP

#include "memory/allStatic.hpp"
#include "metaprogramming/removeCV.hpp"
#include "metaprogramming/removeReference.hpp"

#include <type_traits>

// This trait trims the type from CV qualifiers and references.
// This trait provides a subset of the functionality of std::decay;
// array types and function types are not supported here.

template <typename T>
struct Decay: AllStatic {
typedef typename RemoveCV<typename RemoveReference<T>::type>::type type;
using type = std::remove_cv_t<typename RemoveReference<T>::type>;
};

#endif // SHARE_METAPROGRAMMING_DECAY_HPP
5 changes: 3 additions & 2 deletions src/hotspot/share/metaprogramming/isIntegral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@

#include "metaprogramming/integralConstant.hpp"
#include "metaprogramming/isSigned.hpp"
#include "metaprogramming/removeCV.hpp"

#include <limits>
#include <type_traits>

// This metafunction returns true iff the type T (irrespective of CV qualifiers)
// is an integral type. Note that this is false for enums.

template<typename T>
struct IsIntegral
: public IntegralConstant<bool, std::numeric_limits<typename RemoveCV<T>::type>::is_integer>
: public IntegralConstant<bool, std::numeric_limits<typename std::remove_cv<T>::type>::is_integer>
{};

// This metafunction returns true iff the type T (irrespective of CV qualifiers)
Expand Down
5 changes: 3 additions & 2 deletions src/hotspot/share/metaprogramming/isSigned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
#define SHARE_METAPROGRAMMING_ISSIGNED_HPP

#include "metaprogramming/integralConstant.hpp"
#include "metaprogramming/removeCV.hpp"

#include <limits>
#include <type_traits>

template<typename T>
struct IsSigned
: public IntegralConstant<bool, std::numeric_limits<typename RemoveCV<T>::type>::is_signed>
: public IntegralConstant<bool, std::numeric_limits<typename std::remove_cv<T>::type>::is_signed>
{};

#endif // SHARE_METAPROGRAMMING_ISSIGNED_HPP
50 changes: 0 additions & 50 deletions src/hotspot/share/metaprogramming/removeCV.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions src/hotspot/share/runtime/atomic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
#include "metaprogramming/isPointer.hpp"
#include "metaprogramming/isSame.hpp"
#include "metaprogramming/primitiveConversions.hpp"
#include "metaprogramming/removeCV.hpp"
#include "metaprogramming/removePointer.hpp"
#include "runtime/orderAccess.hpp"
#include "utilities/align.hpp"
#include "utilities/bytes.hpp"
#include "utilities/macros.hpp"

#include <type_traits>

enum atomic_memory_order {
Expand Down Expand Up @@ -794,8 +794,8 @@ template<typename D, typename U, typename T>
struct Atomic::CmpxchgImpl<
D*, U*, T*,
typename EnableIf<Atomic::IsPointerConvertible<T*, D*>::value &&
IsSame<typename RemoveCV<D>::type,
typename RemoveCV<U>::type>::value>::type>
IsSame<std::remove_cv_t<D>,
std::remove_cv_t<U>>::value>::type>
{
D* operator()(D* volatile* dest, U* compare_value, T* exchange_value,
atomic_memory_order order) const {
Expand Down
75 changes: 0 additions & 75 deletions test/hotspot/gtest/metaprogramming/test_removeCV.cpp

This file was deleted.

1 comment on commit 8afd665

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.