Community
Participate
Working Groups
The following (self-contained) code flags an error on the last line, but compiles with no error using GCC/Clang. I've tried to reduce this testcase as much as possible: --- begin --- template <class A> struct hhh { using handle_t = int; using handle_t_r = int &; }; template <template <class A> class tt> struct iii { using handle_t = typename tt<int>::handle_t; using handle_t_r = typename tt<int>::handle_t_r; }; template<typename, typename> struct is_same { static const bool value = false; }; template<typename Tp> struct is_same<Tp, Tp> { static const bool value = true; }; template<bool _Cond, typename Iftrue, typename Iffalse> struct conditional { typedef Iftrue type; }; template<typename Iftrue, typename Iffalse> struct conditional<false, Iftrue, Iffalse> { typedef Iffalse type; }; template <class A> using hhh_d = hhh<A>; constexpr bool use_empty_node = is_same<typename iii<hhh_d>::handle_t_r, typename iii<hhh_d>::handle_t &>::value; using node_type = conditional<use_empty_node, int, float>::type; --- end ---
New Gerrit change created: https://git.eclipse.org/r/129479
Thanks for the report!
(In reply to Nathan Ridge from comment #2) > Thanks for the report! Thanks for the fix - that's great!
Gerrit change https://git.eclipse.org/r/129479 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=732c4874ee94ec65bd90b12d44f55d57585471bb
Fixed for 9.6.