Skip to content

Commit

Permalink
Make bind_front pass with MSVC 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jul 11, 2023
1 parent 618dbc3 commit fab728e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ __host__ __device__ constexpr bool test() {
using X = decltype(cuda::std::bind_front(F{}));
static_assert( cuda::std::is_invocable_v<X&>);
static_assert( cuda::std::is_invocable_v<X const&>);
#ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check
static_assert(!cuda::std::is_invocable_v<X>);
#endif // !TEST_COMPILER_MSVC_2017
static_assert( cuda::std::is_invocable_v<X const>);
}

Expand All @@ -290,12 +292,15 @@ __host__ __device__ constexpr bool test() {
static_assert( cuda::std::is_invocable_v<X&>);
static_assert( cuda::std::is_invocable_v<X const&>);
static_assert( cuda::std::is_invocable_v<X>);
#ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check
static_assert(!cuda::std::is_invocable_v<X const>);
#endif // !TEST_COMPILER_MSVC_2017
}
}
#endif

// Some examples by Tim Song
#ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check
{
{
struct T { };
Expand All @@ -317,6 +322,7 @@ __host__ __device__ constexpr bool test() {
static_assert(!cuda::std::is_invocable_v<X>);
}
}
#endif // !TEST_COMPILER_MSVC_2017

// Test properties of the constructor of the unspecified-type returned by bind_front.
{
Expand Down

0 comments on commit fab728e

Please sign in to comment.