Skip to content

Fix clang build: constexpr pi initialization#209

Merged
The9Cat merged 2 commits intoToomrefrom
copilot/sub-pr-208
Mar 14, 2026
Merged

Fix clang build: constexpr pi initialization#209
The9Cat merged 2 commits intoToomrefrom
copilot/sub-pr-208

Conversation

Copy link

Copilot AI commented Mar 14, 2026

constexpr double pi = std::acos(-1.0) is rejected by clang since std::acos is not constexpr there (GCC accepts it as an extension). This caused CI failures on all clang builds.

Fix

Changed constexprconst in both affected files:

// Before (fails on clang)
constexpr double pi = std::acos(-1.0);

// After (portable)
const double pi = std::acos(-1.0);
  • utils/Test/testDeproject.cc — anonymous namespace
  • utils/Test/testEmpDeproj.cc — inside main

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve BiorthBasis::Cylinder deprojection Fix clang build: constexpr pi initialization Mar 14, 2026
Copilot AI requested a review from The9Cat March 14, 2026 22:49
Copy link
Member

@The9Cat The9Cat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, let's try it.

@The9Cat The9Cat marked this pull request as ready for review March 14, 2026 22:52
@The9Cat The9Cat merged commit 5aed459 into Toomre Mar 14, 2026
@The9Cat The9Cat deleted the copilot/sub-pr-208 branch March 14, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants