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

            Bug ID: 121955
           Summary: if constexpr else scoping issues
           Product: gcc
           Version: 15.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bkoz at gnu dot org
  Target Milestone: ---

No

          if constexpr (k::geolocation_state ==
geo::iplocation_mode::maxmind_1)
            string city = convert_to_utf8(std::get<geo::city>(p));
          else
            string city = std::get<geo::city>(p);



Yes
          string city;
          if constexpr (k::geolocation_state ==
geo::iplocation_mode::maxmind_1)
            city = convert_to_utf8(std::get<geo::city>(p));
          else
            city = std::get<geo::city>(p);



not a biggie, but some unexpected fun when removing macros

Reply via email to