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

            Bug ID: 94929
           Summary: GCC 8 chokes on std::max in alignas
           Product: gcc
           Version: 8.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: soap at gentoo dot org
  Target Milestone: ---

The following snippet

  #include <algorithm>

  struct One {};
  struct Two {};
  struct Foo { alignas(std::max(alignof(One), alignof(Two))) char value; };

compiles fine in GCC 9.3, but in GCC 8.4 fails with

test.cpp:5:65: error: requested alignment is not an integer constant
 struct Foo { alignas(std::max(alignof(One), alignof(Two))) char value; };
                                                                 ^~~~~

Reply via email to