Fix incorrect template declaration of lower_hull_points_2()/upper_hull_points_2() in Convex_hull_2 docs - #9575
Open
prajakta128 wants to merge 1 commit into
Open
Conversation
…_hull_points_2() in docs Split the malformed single declaration (which referenced an undeclared 'Traits' type and undefined 'Default_traits' default) into two correct overload declarations, matching the actual implementation in Convex_hull_2/include/CGAL/convex_hull_2.h and the existing pattern used for convex_hull_2() earlier in this same file. Fixes CGAL#9574
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an inconsistency in the documentation of
CGAL::lower_hull_points_2()andCGAL::upper_hull_points_2()in theConvex_hull_2package. This is a documentation-only change with no impact on compiled code or the public API.Problem
In
Convex_hull_2/doc/Convex_hull_2/CGAL/convex_hull_2.h, both functions were declared with a template parameter list that did not match the symbols used in the declaration body:Two problems here:
Traitsis used as a type inconst Traits& ch_traits, butTraitsis not declared in the template parameter list (class Traitsis missing).= Default_traitsis given as a default value, butDefault_traitsis not defined anywhere in the codebase.The same issue was present for
upper_hull_points_2().Root cause
Comparing against the real implementation in
Convex_hull_2/include/CGAL/convex_hull_2.h, these functions actually have two separate overloads:The documentation had incorrectly merged these two distinct overloads into a single, malformed declaration instead of documenting them separately — unlike
convex_hull_2()earlier in the same file, which correctly documents both overloads independently.Fix
Split the doc declaration of
lower_hull_points_2()andupper_hull_points_2()into two properly-templated declarations each, mirroring the existing correct pattern used forconvex_hull_2():Traitsparameter (template <class InputIterator, class OutputIterator, class Traits>).std::iterator_traitsandCGAL::Kernel_traits(template <class InputIterator, class OutputIterator>).Verification
Convex_hull_2/include/CGAL/convex_hull_2.h(actual implementation against the doc stub — the two-overload structure matches exactly.grep -n "Default_traits\|class Traits"on the modified file no showsclass Traitsonly inside correctly-formed template paramete lists, and no remaining reference to the undefinedDefault_traits.Type of change
Fixes #9574