1
0
mirror of https://github.com/nlohmann/json synced 2024-11-23 04:20:06 +00:00
nlohmannjson/test
Jaakko Moisio 467f622c65 Fix compilation of input_adapter(container) in edge cases
This fixes a compilation issue with the library if trying to use containers that
don't have non-member `begin()` and `end()` functions via ADL.

This patch extends the `using std::begin` and `using std::end` declarations to
also cover the return type deduction of the input_adapter() template
specialization for containers. The previous implementation only enabled the
detection of `std::begin()` and `std::end()` in the function body, making the
specialization unusable for container types that only have member `begin()` and
`end()` functions.

It is not typical to have `using` declarations in the namespace scope in a
header file. But a C++11 implementation can't rely on fully automatic return
type deduction, and needs to rely on ADL enabled helper templates. To prevent
the using declarations leaking, they are enclosed in another nested namespace.
2020-12-28 22:21:02 +01:00
..
cmake_add_subdirectory add test to compile without exceptions 2020-08-10 09:48:11 +02:00
cmake_fetch_content 🔧 add label to tests that require a git checkout 2020-06-17 12:35:59 +02:00
cmake_import Update tests that generate CMake projects to use the CMAKE_CXX_COMPILER the main project was CMake'd with. Fixes #1747. 2019-11-18 21:46:34 -06:00
cmake_import_minver Update tests that generate CMake projects to use the CMAKE_CXX_COMPILER the main project was CMake'd with. Fixes #1747. 2019-11-18 21:46:34 -06:00
cmake_target_include_directories add regression test for #2281 2020-07-22 13:39:40 +02:00
reports added fuzzing results 2016-10-02 11:23:47 +02:00
src Fix compilation of input_adapter(container) in edge cases 2020-12-28 22:21:02 +01:00
thirdparty Doctest is updated to v2.4.3 2020-12-18 07:27:22 +03:00
CMakeLists.txt ♻️ split regression tests 2020-07-30 12:13:05 +02:00
Makefile 🔥 remove test Makefile targets (all handled by CMake) 2020-07-16 13:38:25 +02:00