Ben Deane

Results 19 comments of Ben Deane

This is Scott Schurr's link-time hack that attempts to prevent accidental non-constexpr usage of a function. The idea is that if you accidentally call a function in a non-constexpr context,...

Long term, IMO no. But it's a start.

A few observations: - `std::generate` uses forward iterators, `std::generate_n` uses an output iterator; probably `iterate`/`iterate_n` should do likewise? - since C++20, std::accumulate moves the value through the algorithm; IMO `iterate`/`iterate_n`...

Also of note: - https://wg21.link/p3378 is headed for C++26 Ben Craig is working to bring a lot of functionality to freestanding: - https://wg21.link/p2976 is headed for C++26 - https://wg21.link/p3295 may...

Clang has the builtin function `__can_pass_in_regs(type)` which might be useful, but I don't know if there is a similar intrinsic for GCC or whether it is widely applicable.

@lukevalenty Is this addressed by https://github.com/intel/compile-time-init-build/pull/615 ?

UDLs will never receive the negative sign? Unary minus is an operator, not part of a literal. https://godbolt.org/z/M1hneGfj7

> @elbeno which parameters should I use to properly apply `clang-format`? Couldn't find clues in `git-clang-format.py` Build the target(s) `fix-clang-format` and `check-clang-format`. Note that cmake finds `clang-format`/`clang-tidy` alongside the compiler...

This repo pulls in various CI stuff -- including `.clang-format` -- from https://github.com/intel/cicd-repo-infrastructure. Running cmake should produce a `.clang-format` file (symlinked).

With a clean repo, what I normally do is: ```bash $ cmake -Bbuild $ TOOLCHAIN_ROOT=/usr/lib/llvm-17 cmake --preset clang --fresh $ ninja -C build ``` The first cmake run sets up...