Skip to content

Commit

Permalink
fixed internal compile error under MSVC2013
Browse files Browse the repository at this point in the history
fixes #58
  • Loading branch information
acki-m committed May 29, 2017
1 parent 502b716 commit 03ca4e1
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/rttr/detail/misc/template_type_trait.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,33 @@ struct template_type_trait
static std::vector<type> get_template_arguments() { return{}; }
};

#if RTTR_COMPILER == RTTR_COMPILER_MSVC && RTTR_COMP_VER <= 1800
// otherwise an internal compile error will occur
template<template <typename... > class T>
struct template_type_trait<T<>>
{
using is_template_instantiation = std::true_type;
static std::vector<type> get_template_arguments() { return { }; }
};

template<template <typename... > class T, typename T1, typename...Args>
struct template_type_trait<T<T1, Args...>>
{
using is_template_instantiation = std::true_type;
static std::vector<type> get_template_arguments() { return { type::get<T1>(), rttr::type::get<Args>()..., }; }
};

#else

template<template <typename... > class T, typename...Args>
struct template_type_trait<T<Args...>>
{
using is_template_instantiation = std::true_type;
static std::vector<type> get_template_arguments() { return{ type::get<Args>()..., }; }
static std::vector<type> get_template_arguments() { return { type::get<Args>()..., }; }
};

#endif

} // end namespace detail
} // end namespace rttr

Expand Down

0 comments on commit 03ca4e1

Please sign in to comment.