Skip to content

Commit

Permalink
Restore the "extraneous" initializers
Browse files Browse the repository at this point in the history
[dcl.constexpr]/10 suggests that even const-default-constructible constexpr objects must have an initializer.
  • Loading branch information
CaseyCarter committed Jan 17, 2020
1 parent a43e3d7 commit b93cfc7
Show file tree
Hide file tree
Showing 124 changed files with 184 additions and 184 deletions.
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/adjacent_find.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __adjacent_find_fn adjacent_find;
inline constexpr __adjacent_find_fn adjacent_find{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/all_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __all_of_fn all_of;
inline constexpr __all_of_fn all_of{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/any_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __any_of_fn any_of;
inline constexpr __any_of_fn any_of{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/binary_search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __binary_search_fn binary_search;
inline constexpr __binary_search_fn binary_search{};
} STL2_CLOSE_NAMESPACE

#endif
4 changes: 2 additions & 2 deletions include/stl2/detail/algorithm/copy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __copy_fn copy;
inline constexpr __copy_fn copy{};

namespace ext {
struct __copy_fn : private __niebloid {
Expand Down Expand Up @@ -85,7 +85,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __copy_fn copy;
inline constexpr __copy_fn copy{};
} // namespace ext
} STL2_CLOSE_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/copy_backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __copy_backward_fn copy_backward;
inline constexpr __copy_backward_fn copy_backward{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/copy_if.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __copy_if_fn copy_if;
inline constexpr __copy_if_fn copy_if{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/copy_n.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __copy_n_fn copy_n;
inline constexpr __copy_n_fn copy_n{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/count.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __count_fn count;
inline constexpr __count_fn count{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/count_if.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __count_if_fn count_if;
inline constexpr __count_if_fn count_if{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/equal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __equal_fn equal;
inline constexpr __equal_fn equal{};
} STL2_CLOSE_NAMESPACE

#endif
4 changes: 2 additions & 2 deletions include/stl2/detail/algorithm/equal_range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __equal_range_n_fn equal_range_n;
inline constexpr __equal_range_n_fn equal_range_n{};
} // namespace ext

struct __equal_range_fn : private __niebloid {
Expand Down Expand Up @@ -124,7 +124,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __equal_range_fn equal_range;
inline constexpr __equal_range_fn equal_range{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/fill.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __fill_fn fill;
inline constexpr __fill_fn fill{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/fill_n.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __fill_n_fn fill_n;
inline constexpr __fill_n_fn fill_n{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/find.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __find_fn find;
inline constexpr __find_fn find{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/find_end.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __find_end_fn find_end;
inline constexpr __find_end_fn find_end{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/find_first_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __find_first_of_fn find_first_of;
inline constexpr __find_first_of_fn find_first_of{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/find_if.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __find_if_fn find_if;
inline constexpr __find_if_fn find_if{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/find_if_not.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __find_if_not_fn find_if_not;
inline constexpr __find_if_not_fn find_if_not{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/for_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __for_each_fn for_each;
inline constexpr __for_each_fn for_each{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/generate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __generate_fn generate;
inline constexpr __generate_fn generate{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/generate_n.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __generate_n_fn generate_n;
inline constexpr __generate_n_fn generate_n{};
} STL2_CLOSE_NAMESPACE

#endif
4 changes: 2 additions & 2 deletions include/stl2/detail/algorithm/heap_sift.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __sift_up_n_fn sift_up_n;
inline constexpr __sift_up_n_fn sift_up_n{};

struct __sift_down_n_fn {
template<random_access_iterator I, class Comp, class Proj>
Expand Down Expand Up @@ -122,7 +122,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __sift_down_n_fn sift_down_n;
inline constexpr __sift_down_n_fn sift_down_n{};
}
} STL2_CLOSE_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/includes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __includes_fn includes;
inline constexpr __includes_fn includes{};
} STL2_CLOSE_NAMESPACE

#endif
6 changes: 3 additions & 3 deletions include/stl2/detail/algorithm/inplace_merge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr merge_adaptive_fn merge_adaptive;
inline constexpr merge_adaptive_fn merge_adaptive{};

struct inplace_merge_no_buffer_fn
{
Expand All @@ -179,7 +179,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr inplace_merge_no_buffer_fn inplace_merge_no_buffer;
inline constexpr inplace_merge_no_buffer_fn inplace_merge_no_buffer{};
}

struct __inplace_merge_fn : private __niebloid {
Expand Down Expand Up @@ -208,7 +208,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __inplace_merge_fn inplace_merge;
inline constexpr __inplace_merge_fn inplace_merge{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/is_heap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_heap_fn is_heap;
inline constexpr __is_heap_fn is_heap{};
} STL2_CLOSE_NAMESPACE

#endif
4 changes: 2 additions & 2 deletions include/stl2/detail/algorithm/is_heap_until.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_heap_until_n_fn is_heap_until_n;
inline constexpr __is_heap_until_n_fn is_heap_until_n{};
}

struct __is_heap_until_fn : private __niebloid {
Expand All @@ -83,7 +83,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_heap_until_fn is_heap_until;
inline constexpr __is_heap_until_fn is_heap_until{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/is_partitioned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_partitioned_fn is_partitioned;
inline constexpr __is_partitioned_fn is_partitioned{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/is_permutation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_permutation_fn is_permutation;
inline constexpr __is_permutation_fn is_permutation{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/is_sorted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_sorted_fn is_sorted;
inline constexpr __is_sorted_fn is_sorted{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/is_sorted_until.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __is_sorted_until_fn is_sorted_until;
inline constexpr __is_sorted_until_fn is_sorted_until{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/lexicographical_compare.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __lexicographical_compare_fn lexicographical_compare;
inline constexpr __lexicographical_compare_fn lexicographical_compare{};
} STL2_CLOSE_NAMESPACE

#endif
4 changes: 2 additions & 2 deletions include/stl2/detail/algorithm/lower_bound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __lower_bound_n_fn lower_bound_n;
inline constexpr __lower_bound_n_fn lower_bound_n{};
}

struct __lower_bound_fn : private __niebloid {
Expand Down Expand Up @@ -74,7 +74,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __lower_bound_fn lower_bound;
inline constexpr __lower_bound_fn lower_bound{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/make_heap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __make_heap_fn make_heap;
inline constexpr __make_heap_fn make_heap{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/max.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __max_fn max;
inline constexpr __max_fn max{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/max_element.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __max_element_fn max_element;
inline constexpr __max_element_fn max_element{};
} STL2_CLOSE_NAMESPACE

#endif
2 changes: 1 addition & 1 deletion include/stl2/detail/algorithm/merge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ STL2_OPEN_NAMESPACE {
}
};

inline constexpr __merge_fn merge;
inline constexpr __merge_fn merge{};
} STL2_CLOSE_NAMESPACE

#endif

0 comments on commit b93cfc7

Please sign in to comment.