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

            Bug ID: 77797
           Summary: Unable to use constexpr function as constexpr template
                    parameter
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slavanap at yandex dot ru
  Target Milestone: ---

Created attachment 39725
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39725&action=edit
test case that represents and describes the bug

Code in attachment does compile with g++ 5.1.0, but does not with 4.9.3. Here
you can try that online http://melpon.org/wandbox/permlink/hGFy7IEnCycvgvLr

In short, constexpr function as a template parameter with conjunction of
parameter pack expansion does not work with g++ 4.9.3.

Full sample code in the attachment.

Please compile it with
g++ sample.cpp -Wall -Wextra -std=c++11

Note, `(defined _MSC_VER && _MSC_VER < 1900) || (!defined _MSC_VER &&
__cplusplus <= 201103L)` condition will resolve to `true`, because of
`-std=c++11` g++ option.

Reply via email to