Commit 0de08aae authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'teach_brigand_about_cray_compiler'


 Teach brigand about more intel compiler limitations introduced in 18.X.
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !1020
parents 9fc3e6a7 06c5f161
......@@ -235,6 +235,19 @@ namespace detail
namespace brigand
template<typename T, typename U>
struct same
using type = T;
template<typename T>
struct same<T, std::true_type>
static_assert(std::is_same<T, std::true_type>::value, "");
using type = T;
namespace detail
template<class T> struct element_at;
......@@ -243,21 +256,20 @@ namespace brigand
template<class T> type_<T> static at(Ts..., type_<T>*, ...);
//CUDA 9 version that is required
template<class R, class... Other> type_<R> static at_with_type(Ts..., R, Other...);
//CUDA 9 and Intel 18 version that is required
template<class T, class... Other> T static at_with_type(Ts..., T*, Other...);
template<class T> T extract_type(type_<T>*);
template<std::size_t N, typename Seq> struct at_impl;
#if defined(BRIGAND_COMP_CUDA_9)
//Only needed for CUDA 9 RC1 as it has some compiler bugs
#if defined(BRIGAND_COMP_CUDA_9) || defined(BRIGAND_COMP_INTEL)
//Both CUDA 9 and the Intel 18 compiler series have a problem deducing the
//type so we are just going
template <std::size_t N, template <typename...> class L, class... Ts>
struct at_impl<N, L<Ts...>>
using base_with_type = decltype(
element_at<filled_list<void const*, N>>::at_with_type(static_cast<type_<Ts>*>(nullptr)...));
using type = decltype(extract_type(typename base_with_type::type{}));
using type = typename base_with_type::type;
// This is the original implementation
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment