Skip to content

Commit

Permalink
Fixed compiler error involving template resolution in is_same::invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbar27 committed May 18, 2019
1 parent dde72a2 commit b0a8358
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions datraw/datraw/variant.inl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ void datraw::detail::copy_to<C, T>::invoke(const type& v,
template<class C, datraw::variant_type T>
void datraw::detail::is_same<C, T>::invoke(type& v, const variant_type& rhs,
bool& retval) {
// Cf. https://stackoverflow.com/questions/3505713/c-template-compilation-error-expected-primary-expression-before-token
retval = (v == rhs.template get<T>());
typedef detail::variant_fwd_traits<C, T> traits;
assert(rhs.type() == T);
// Cf. https://stackoverflow.com/questions/3505713/c-template-compilation-error-expected-primary-expression-before-token
//retval = (v == rhs.template get<T>());
// New version of VS2017 cannot resolve the above any more ...
retval = (v == rhs.template get<traits::value_type>());
}


Expand Down

0 comments on commit b0a8358

Please sign in to comment.