Polyman Documentation - v3.1.0
    Preparing search index...

    Function cppStandardFromSourceType

    • Reads the C++ standard named in a Polygon sourceType, for example cpp.g++17 or cpp.gcc14-64-msys2-g++23. Types that name no standard (cpp.ms2017, java21, ...) give undefined.

      Parameters

      • OptionalsourceType: string

        Polygon compiler identifier

      Returns string | undefined

      A value usable as -std=<value>, or undefined when the type names no C++ standard

      cppStandardFromSourceType('cpp.g++17'); // 'c++17'
      cppStandardFromSourceType('cpp.clang++20'); // 'c++20'
      cppStandardFromSourceType('cpp.ms2019'); // undefined