Open dhebbeker opened 2 months ago
I think the issue is here:
void_t<decltype(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))>
This does not allow begin()
and end()
to require lvalue references.
In the example those functions require lvalue references (begin(MyContainer& tgt)
). This should be legitimate as std::begin()
also expects lvalue references for container types. But std::declval()
returns an rvalue reference by definition.
Description
The example in the current section "Custom data source" does not compile with the current header. I don't know if the example or the library is erroneous (I suspect the former). But even if it is just an example I would expect it to compile - or to have an explanation of the necessary steps to make it work.
Current refers to the current
develop
branch.Reproduction steps
To reproduce:
#include
andusing namespace
.MyContainer::advance()
andMyContainer::get_current()
(does not make any difference at this stage)See result on Compiler Explorer with clang 15.0.0.
Expected vs. actual results
I would expect the code to compile (without linking) without errors.
Note: It compiles (not linking) if this call to the parser is used instead:
But the example is about using a container.
Minimal code example
Error messages
Compiler and operating system
x86-64 clang 15.0.0
Library version
8c391e04fe4195d8be862c97f38cfe10e2a3472e
Validation
develop
branch is used.