From 6606c748ae8962f5921b0abe5957d9854c40c77a Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Wed, 6 Nov 2024 09:47:27 +0100 Subject: [PATCH] Make exporting of std::ranges functions conditional --- src/CxxWrap.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CxxWrap.jl b/src/CxxWrap.jl index d87f377..7e3db4b 100644 --- a/src/CxxWrap.jl +++ b/src/CxxWrap.jl @@ -949,11 +949,14 @@ CppEnum, ConstArray, CxxBool, CxxLong, CxxULong, CxxChar, CxxChar16, CxxChar32, CxxLongLong, CxxULongLong, ptrunion, gcprotect, gcunprotect, isnull using .StdLib: StdVector, StdString, StdWString, StdValArray, StdThread, StdDeque, StdQueue, StdStack, - StdSet, StdMultiset, StdUnorderedSet, StdUnorderedMultiset, StdPriorityQueue, StdList, StdForwardList, - StdUpperBound, StdLowerBound, StdBinarySearch + StdSet, StdMultiset, StdUnorderedSet, StdUnorderedMultiset, StdPriorityQueue, StdList, StdForwardList export StdLib, StdVector, StdString, StdWString, StdValArray, StdThread, StdDeque, StdQueue, StdStack, - StdSet, StdMultiset, StdUnorderedSet, StdUnorderedMultiset, StdPriorityQueue, StdList, StdForwardList, - StdUpperBound, StdLowerBound, StdBinarySearch + StdSet, StdMultiset, StdUnorderedSet, StdUnorderedMultiset, StdPriorityQueue, StdList, StdForwardList + +@static if isdefined(StdLib, :HAS_RANGES) + using .StdLib: StdUpperBound, StdLowerBound, StdBinarySearch + export StdUpperBound, StdLowerBound, StdBinarySearch +end end # module