core
core copied to clipboard
Boost Core Utilities
Semantically ordered arguments should be lexically ordered, too. See https://quuxplusone.github.io/blog/2021/05/05/its-clamping-time/ I feel _very_ strongly that the arguments to `pointer_in_range` — like the arguments to `rotate` and so on (with the...
(1.84 gcc 13.2) upgrading boost from 1.75 to 1.84 breaks existing code that boils down to: ````c++ #include struct Foo { Foo(std::string_view f) {} Foo(const std::string& f) {} }; int...
``` #include namespace boost { namespace core { template inline std::string nameof() { return demangle(typeid(Type).name()); } } // core } // boost ``` This saves a lot of manual fiddling...
Right now most of allocator access takes the allocator by lvalue reference. I presume this is to support stateful allocators. Instead, I purport that allocator access should also work with...
Hi, this is rather an inquiry than an actual issue. `boost::core::invoke_swap` only participates in overload resolution, when the type it gets called with is not const qualified ([invoke_swap.hpp#L81](https://github.com/boostorg/core/blob/develop/include/boost/core/invoke_swap.hpp#L81)). C++23 standardized...
`std::span` constructors 2 and 3 of [cppreference.com documentation](https://en.cppreference.com/w/cpp/container/span/span) support generic iterators, while `boost::span` accepts only pointers. A possible workaround is to apply the operators `&*` to the iterators. https://godbolt.org/z/sjEozr6M5 ```c++...
NOTE: This isn't something `std::span` in C++20 supports either, unfortunately. But since Boost tries to offer things a future standard might adopt, I think this fits? Because `boost::span` has no...
*Problem In many cases a bit_cast is needed. However, it cannot be assumed that std::bit_cast is available. Therefore it would make sense to "rebuild" this in boost; my implementation: [cast.hpp.txt](https://github.com/boostorg/core/files/11617919/cast.hpp.txt)...
There are four deprecated files in utility/ but there is no pragma warning or notice to users aside from a comment which no one sees. If we want to normalize...
Suppose we have a common utility class that performs a check on the passed value: ``` template< typename T > class checker { T& m_expected; public: void operator() (T const&...