mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
3d91603c8e
std::basic_string takes three template parameters: 1. CharT 2. Traits 3. Allocator The Traits parameter was causing issues, as it requires a type which exposes certain things, e.g. `Traits::value_type`. We have a few options to resolve this: 1. Remove this parameter, as we do for allocators Cons: removing a template parameter doesn't work if other parameters appear after it 2. Stub this parameter, as we do for hashers/comparators Cons: we need to hardcode an implementation that satisfies the `Traits::value_type` requirements 3. Leave the parameter as-is Cons: will not work if a non-standard Traits is used By using the real implementation of this Traits parameter (normally `std::char_traits<CharT>`), we get one that we know will work as long as it is defined in a stdlib header. Option 3 is what we use in this patch. Instead of adding more configuration options to the container TOML file format (e.g. `params_to_keep = [1]`), we add `std::char_traits` as a dummy container type. Now, whenever `std::char_traits` appears, it will be left as-is, i.e. not removed, replaced or reverse-engineered. This is the same approach previously used for Thrift's isset_bitset.
51 lines
1.7 KiB
TOML
51 lines
1.7 KiB
TOML
# DON'T use this file directly.
|
|
#
|
|
# It is used to extend sample.oid.toml for development purposes.
|
|
|
|
[types]
|
|
containers = [
|
|
"PWD/types/array_type.toml",
|
|
"PWD/types/string_type.toml",
|
|
"PWD/types/cxx11_string_type.toml",
|
|
"PWD/types/folly_iobuf_type.toml",
|
|
"PWD/types/folly_iobuf_queue_type.toml",
|
|
"PWD/types/set_type.toml",
|
|
"PWD/types/unordered_set_type.toml",
|
|
"PWD/types/seq_type.toml",
|
|
"PWD/types/list_type.toml",
|
|
"PWD/types/cxx11_list_type.toml",
|
|
"PWD/types/deque_list_type.toml",
|
|
"PWD/types/shrd_ptr_type.toml",
|
|
"PWD/types/uniq_ptr_type.toml",
|
|
"PWD/types/std_map_type.toml",
|
|
"PWD/types/std_unordered_map_type.toml",
|
|
"PWD/types/pair_type.toml",
|
|
"PWD/types/stack_container_adapter_type.toml",
|
|
"PWD/types/queue_container_adapter_type.toml",
|
|
"PWD/types/priority_queue_container_adapter_type.toml",
|
|
"PWD/types/ref_wrapper_type.toml",
|
|
"PWD/types/multi_map_type.toml",
|
|
"PWD/types/folly_small_heap_vector_map.toml",
|
|
"PWD/types/folly_optional_type.toml",
|
|
"PWD/types/optional_type.toml",
|
|
"PWD/types/try_type.toml",
|
|
"PWD/types/fb_string_type.toml",
|
|
"PWD/types/small_vec_type.toml",
|
|
"PWD/types/f14_fast_map.toml",
|
|
"PWD/types/f14_node_map.toml",
|
|
"PWD/types/f14_vector_map.toml",
|
|
"PWD/types/f14_fast_set.toml",
|
|
"PWD/types/f14_node_set.toml",
|
|
"PWD/types/f14_vector_set.toml",
|
|
"PWD/types/sorted_vec_set_type.toml",
|
|
"PWD/types/map_seq_type.toml",
|
|
"PWD/types/boost_bimap_type.toml",
|
|
"PWD/types/repeated_field_type.toml",
|
|
"PWD/types/repeated_ptr_field_type.toml",
|
|
"PWD/types/caffe2_blob_type.toml",
|
|
"PWD/types/std_variant.toml",
|
|
"PWD/types/thrift_isset_type.toml",
|
|
"PWD/types/weak_ptr_type.toml",
|
|
"PWD/types/std_char_traits.toml",
|
|
]
|