Skip to content

Commit

Permalink
Remove non_trivial_copyable base
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jan 5, 2024
1 parent 50ce545 commit a34cda5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 201 deletions.
10 changes: 0 additions & 10 deletions libcudacxx/include/cuda/std/detail/libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,6 @@ extern "C++" {
// conflict with the dllexport-emitted copy, so we disable it.
# define _LIBCUDACXX_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
# endif
// Feature macros for disabling pre ABI v1 features. All of these options
// are deprecated.
# if defined(__FreeBSD__)
# define _LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
# endif
#endif

#ifdef _LIBCUDACXX_TRIVIAL_PAIR_COPY_CTOR
#error "_LIBCUDACXX_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
use _LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#endif

#ifndef __has_attribute
Expand Down
13 changes: 0 additions & 13 deletions libcudacxx/include/cuda/std/detail/libcxx/include/__utility/pair.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,8 @@

_LIBCUDACXX_BEGIN_NAMESPACE_STD

#if defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
template <class, class>
struct __non_trivially_copyable_base {
_LIBCUDACXX_INLINE_VISIBILITY constexpr
__non_trivially_copyable_base() noexcept {}
_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
__non_trivially_copyable_base(__non_trivially_copyable_base const&) noexcept {}
};
#endif

template <class _T1, class _T2>
struct _LIBCUDACXX_TEMPLATE_VIS pair
#if defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
: private __non_trivially_copyable_base<_T1, _T2>
#endif
{
typedef _T1 first_type;
typedef _T2 second_type;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

#include "test_macros.h"

#if defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
#error Non-trivial ctor ABI macro defined
#endif

template <class T>
struct HasTrivialABI : std::integral_constant<bool,
std::is_trivially_destructible<T>::value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,19 @@ int main(int, char**)
typedef std::pair<int, short> P;
{
static_assert(std::is_copy_constructible<P>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_copy_constructible<P>::value, "");
#endif
}
#if TEST_STD_VER >= 2011
{
static_assert(std::is_move_constructible<P>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_move_constructible<P>::value, "");
#endif
}
{
using P1 = std::pair<Dummy, int>;
static_assert(!std::is_copy_constructible<P1>::value, "");
static_assert(!std::is_trivially_copy_constructible<P1>::value, "");
static_assert(std::is_move_constructible<P1>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_move_constructible<P1>::value, "");
#endif
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,18 @@ int main(int, char**)
typedef cuda::std::pair<int, short> P;
{
static_assert(cuda::std::is_copy_constructible<P>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(cuda::std::is_trivially_copy_constructible<P>::value, "");
#endif
}
{
static_assert(cuda::std::is_move_constructible<P>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(cuda::std::is_trivially_move_constructible<P>::value, "");
#endif
}
{
using P1 = cuda::std::pair<Dummy, int>;
static_assert(!cuda::std::is_copy_constructible<P1>::value, "");
static_assert(!cuda::std::is_trivially_copy_constructible<P1>::value, "");
static_assert(cuda::std::is_move_constructible<P1>::value, "");
#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(cuda::std::is_trivially_move_constructible<P1>::value, "");
#endif
}

return 0;
Expand Down

0 comments on commit a34cda5

Please sign in to comment.