Changeset View
Changeset View
Standalone View
Standalone View
libcxx/utils/generate_feature_test_macro_components.py
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | feature_test_macros = [ add_version_header(x) for x in [ | ||||
"values": { "c++17": 201411 }, | "values": { "c++17": 201411 }, | ||||
"headers": ["unordered_map"], | "headers": ["unordered_map"], | ||||
}, { | }, { | ||||
"name": "__cpp_lib_unwrap_ref", | "name": "__cpp_lib_unwrap_ref", | ||||
"values": { "c++20": 201811 }, | "values": { "c++20": 201811 }, | ||||
"headers": ["functional"], | "headers": ["functional"], | ||||
}, { | }, { | ||||
"name": "__cpp_lib_variant", | "name": "__cpp_lib_variant", | ||||
"values": { "c++17": 201606 }, | "values": { "c++17": 202102 }, | ||||
Quuxplusone: Since you're making the change in all language versions (IIUC), shouldn't the feature-test… | |||||
Ha, good catch. No idea what should be done, probably always setting to the higher value is OK. curdeius: Ha, good catch. No idea what should be done, probably always setting to the higher value is OK. | |||||
@ldionne, what's your opinion on this? curdeius: @ldionne, what's your opinion on this? | |||||
Yes, I think we need to always use the higher value. Otherwise, we're pretending that we implement a slightly different version of std::variant than we really are. ldionne: Yes, I think we need to always use the higher value. Otherwise, we're pretending that we… | |||||
"headers": ["variant"], | "headers": ["variant"], | ||||
}, { | }, { | ||||
"name": "__cpp_lib_void_t", | "name": "__cpp_lib_void_t", | ||||
"values": { "c++17": 201411 }, | "values": { "c++17": 201411 }, | ||||
"headers": ["type_traits"], | "headers": ["type_traits"], | ||||
} | } | ||||
]] | ]] | ||||
▲ Show 20 Lines • Show All 451 Lines • Show Last 20 Lines |
Since you're making the change in all language versions (IIUC), shouldn't the feature-test macro have the higher value in all language versions? (Has this situation ever come up in WG21 before? what did the Committee think vendors should do?)