public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105482] New: Regression with `>=` in a template argument
@ 2022-05-04 15:12 pdimov at gmail dot com
  2022-05-04 15:13 ` [Bug c++/105482] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: pdimov at gmail dot com @ 2022-05-04 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105482
           Summary: Regression with `>=` in a template argument
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pdimov at gmail dot com
  Target Milestone: ---

The current GCC trunk in C++11 or C++14 mode gives an error when including
boost/mp11/algorithm.hpp (from Boost 1.79):

opt/compiler-explorer/libs/boost_1_79_0/boost/mp11/algorithm.hpp:445:102:
error: '>=' should be '> =' to terminate a template argument list
  445 | struct mp_take_c_impl<N, L<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T...>, typename std::enable_if<N >= 10>::type>
      |                                                                        
                             ^~
      |                                                                        
                             > =
/opt/compiler-explorer/libs/boost_1_79_0/boost/mp11/algorithm.hpp:445:107:
error: template argument 3 is invalid
  445 | struct mp_take_c_impl<N, L<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T...>, typename std::enable_if<N >= 10>::type>
      |                                                                        
                                  ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/mp11/algorithm.hpp:445:114:
error: expected unqualified-id before '>' token
  445 | struct mp_take_c_impl<N, L<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T...>, typename std::enable_if<N >= 10>::type>
      |                                                                        
                                         ^

See e.g. https://godbolt.org/z/nE9754and and
https://github.com/boostorg/mp11/issues/73.

GCC 11 works, as does trunk in C++17 mode or later.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/105482] Regression with `>=` in a template argument
  2022-05-04 15:12 [Bug c++/105482] New: Regression with `>=` in a template argument pdimov at gmail dot com
@ 2022-05-04 15:13 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-05-04 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
dup

*** This bug has been marked as a duplicate of bug 105436 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-04 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 15:12 [Bug c++/105482] New: Regression with `>=` in a template argument pdimov at gmail dot com
2022-05-04 15:13 ` [Bug c++/105482] " mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).