# Copyright 2017 Rene Rivera
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.bfgroup.xyz/b2/LICENSE.txt)

import feature ;

#| tag::doc[]

[[b2.builtin.features.cxxstd]]`cxxstd`::
*Allowed values*: `98`, `03`, `0x`, `11`, `1y`, `14`, `1z`, `17`, `2a`, `20`,
`2b`, `23`, `2c`, `26`, `latest`.
+
Specifies the version of the C++ Standard Language to build with. All the
official versions of the standard since "98" are included.  It is also possible
to specify using the experimental, work in progress, `latest` version. Some
compilers specified intermediate versions for the experimental versions leading
up to the released standard version. Those are included following the GNU
nomenclature as `0x`, `1y`, `1z`, `2a`, `2b` and `2c`. Depending on the compiler
`latest` would map to one of those.

TIP: This is an `optional` feature. Hence when not specified the compiler
default behavior is used.

NOTE: Please consult the toolset specific documentation for which `cxxstd`
is supported.

|# # end::doc[]

feature.feature cxxstd
    : 98 03 0x 11 1y 14 1z 17 2a 20 2b 23 2c 26 latest
    : optional composite propagated ;

#| tag::doc[]

[[b2.builtin.features.cxxstd-dialect]]`cxxstd-dialect`::
*Subfeature of* `cxxstd`
+
*Allowed values*: `iso`, `gnu`, `ms`.
+
Indicates if a non-standard dialect should be used. These usually have
either/or extensions or platform specific functionality. Not specifying the
dialect will default to 'iso' which will attempt to use ISO C++ Standard
conformance to the best of the compiler's ability.

|# # end::doc[]

feature.subfeature cxxstd : dialect
    : iso gnu ms
    : composite propagated ;
