Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[build failure] clang++ 23 not including <cmath> and <vector> by default

Closed Beginner friendly
#3,146 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@outtersg is already working on this.

Since Sep 29, 2026.

  • #3147 by @outtersg — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

Inspect src/api/wayfire/geometry.hpp and src/api/wayfire/signal-provider.hpp, starting with the missing std::floor and std::vector declarations reported by clang++ 23. Add the required standard-library includes if appropriate, then replay the clang++ 23.1.1 build and confirm the affected compilations succeed without regressing the clang++ 22.1.8 build.

Written by the indexing model from the issue text.

Description

Describe the issue

When building with clang++ 23.1.1, two .hpp make the compilations fail:

In file included from ../plugins/common/workspace-wall.cpp:1:
In file included from ../plugins/common/wayfire/plugins/common/workspace-wall.hpp:3:
In file included from ../src/api/wayfire/workspace-set.hpp:4:
../src/api/wayfire/geometry.hpp:66:29: error: no member named 'floor' in namespace 'std'; did you mean simply 'floor'?
   66 |         return point_t{(int)std::floor(x), (int)std::floor(y)};
      |                             ^~~~~~~~~~
      |                             floor
[…]
In file included from ../plugins/common/move-drag-interface.cpp:1:
In file included from ../plugins/common/wayfire/plugins/common/move-drag-interface.hpp:3:
In file included from ../src/api/wayfire/toplevel-view.hpp:4:
In file included from ../src/api/wayfire/view.hpp:8:
In file included from ../src/api/wayfire/nonstd/tracking-allocator.hpp:7:
../src/api/wayfire/signal-provider.hpp:48:10: error: no template named 'vector' in namespace 'std'
   48 |     std::vector<provider_t*> connected_to;
      |     ~~~~~^

Replaying the same exact command with clang++ 23.1.1 replaced by a (similarly installed) clang++ 22.1.8 install passes.

So this is probably clang 23 being stricter in its enforcement of the C++ standard, or having changed its way of compiling (compiling once for all at inclusion of the .hpp, rather than function by function at use in a .cpp?).

Obvious workaround

#include <cmath> and #include <vector> make everything pass.

Now is it the expected way of maintaining include cleanness?

Dominant language
C++
Stars
3.1k
Forks
247
Avg merge
8d 11h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WayfireWM/wayfire

All issues in WayfireWM/wayfire

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.