https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68395

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Using -std=gnu++17 -fconcepts this compiles OK with GCC 7, 8 and 9. Rejected
with trunk:

bug5.cpp:72:3: warning: access declarations are deprecated in favour of
using-declarations; suggestion: add the 'using' keyword [-Wdeprecated]
   72 |   detail_tuple::TupleBase<std::index_sequence_for<>,
Values...>::TupleBase;
      |   ^~~~~~~~~~~~
bug5.cpp:84:42: warning: the address of 'void and_c() [with bool ...<anonymous>
= {}]' will never be NULL [-Waddress]
   84 | constexpr bool are_equal_length_tuples = and_c<>;
      |                                          ^~~~~~~
bug5.cpp:96:11: error: 'cpt_MappableElement' does not constrain a type
   96 |     and_c<cpt_MappableElement<Indexes>()...>;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
bug5.cpp:86:14: note: concept defined here
   86 | concept bool cpt_MappableElement() {
      |              ^~~~~~~~~~~~~~~~~~~
bug5.cpp:156:1: warning: ISO C++ forbids declaration of 'main' with no type
[-Wreturn-type]
  156 | main() {
      | ^~~~
bug5.cpp: In instantiation of 'constexpr const bool
htl::detail_concept::mappable_elements<std::F<int, 1>, int>':
bug5.cpp:102:9:   required from 'constexpr const bool
htl::detail_concept::mappable_impl<int, const
htl::Tuple<htl::integral_constant<long int, 2>, htl::integral_constant<long
int, 7> >, const htl::Tuple<htl::integral_constant<long int, 3>, long int> >'
bug5.cpp:108:26:   required from here
bug5.cpp:94:16: warning: the address of 'void and_c() [with bool ...<anonymous>
= {false}]' will never be NULL [-Waddress]
   94 | constexpr bool mappable_elements<std::index_sequence<Indexes...>,
Functor,
      |               
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   95 |                                  TupleForwards...> =
      |                                  ~~~~~~~~~~~~~~~~~
bug5.cpp: In instantiation of 'constexpr const bool
htl::detail_concept::mappable_predicate_impl<int, const
htl::Tuple<htl::integral_constant<long int, 2>, htl::integral_constant<long
int, 7> >, const htl::Tuple<htl::integral_constant<long int, 3>, long int> >':
bug5.cpp:124:26:   required from here
bug5.cpp:118:40: warning: the address of 'bool
htl::detail_concept::cpt_MappablePredicateImpl() [with <template-parameter-1-1>
= int]' will never be NULL [-Waddress]
  118 |     TupleForwards...>() constexpr bool
mappable_predicate_impl<Predicate,
      |                                       
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  119 |                                                               
TupleForwards...> =
      |                                                               
~~~~~~~~~~~~~~~~~

Reply via email to