Skip to content

validate.cpp: static_assert is_sorted() for the lookup tables #455

@StephanTLavavej

Description

@StephanTLavavej

When VS 2019 16.6 Preview 1 is available, the shipping toolset will support #6 constexpr is_sorted(). At that time, this will become a "good first issue".

  1. We'll need to build the tools with /std:c++latest. This is accomplished by telling CMake to use C++20 instead of C++17:

set(CMAKE_CXX_STANDARD 17)

  1. Then we can remove this comment ("TRANSITION" means "TODO" for us), and change each assert to static_assert:

// TRANSITION, P0202R3, use constexpr is_sorted()
assert(is_sorted(skipped_directories.begin(), skipped_directories.end()));
assert(is_sorted(skipped_extensions.begin(), skipped_extensions.end()));
assert(is_sorted(tabby_filenames.begin(), tabby_filenames.end()));

(Related to #224.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!good first issueGood for newcomersinfrastructureRelated to repository automation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions