(compiler)
Return the max supported C++ std level (17, 14, or 11). Returns latest on Windows.
Return the max supported C++ std level (17, 14, or 11). Returns latest on Windows.
Return the max supported C ++ std level ( 17 14 or 11 ) . Returns latest on Windows .
def auto_cpp_level(compiler):
    """
    Return the max supported C++ std level (17, 14, or 11). Returns latest on Windows.
    """

    if WIN:
        return "latest"

    global cpp_flag_cache

    # If this has been previously calculated with the same args, return that
    with cpp_cache_lock:
        if cpp_flag_cache:
            return cpp_flag_cache

    levels = [17, 14, 11]

    for level in levels:
        if has_flag(compiler, STD_TMPL.format(level)):
            with cpp_cache_lock:
                cpp_flag_cache = level
            return level

    msg = "Unsupported compiler -- at least C++11 support is needed!"
    raise RuntimeError(msg)
def auto_cpp_level ( compiler ) : if WIN : return "latest" global cpp_flag_cache # If this has been previously calculated with the same args, return that with cpp_cache_lock : if cpp_flag_cache : return cpp_flag_cache levels = [ 17 , 14 , 11 ] for level in levels : if has_flag ( compiler , STD_TMPL . format ( level ) ) : with cpp_cache_lock : cpp_flag_cache = level return level msg = "Unsupported compiler -- at least C++11 support is needed!" raise RuntimeError ( msg )