// Copyright 2020 The Division Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Author dietoad@gmail.com && firedtoad@gmail.com #include "utils/symbol.h" #include #include #include #include #include #include #include #include #include template void PrintVector(T &&...t) { (..., (std::cout << demangle(typeid(t).name()) << " size " << sizeof(typename T::value_type) << '\n')); std::cout << '\n'; } template void PrintNode(T &&...t) { (..., (std::cout << demangle(typeid(typename T::node_type).name()) << " size " << sizeof(typename T::node_type) << '\n')); std::cout << '\n'; } template void PrintContainer(T &&...t) { (..., (std::cout << demangle(typeid(t).name()) << " size " << sizeof(typename T::value_type) << '\n')); std::cout << '\n'; } template void PrintList(T &&...t) { (..., (std::cout << demangle(typeid(t).name()) << " size " << sizeof(t) << '\n')); std::cout << '\n'; } struct S { int id; int c[10]; }; int main(int argc, char *argv[]) { PrintVector(std::vector{}, std::vector{}, std::vector{}, std::vector{}); PrintVector(std::deque{}, std::deque{}, std::deque{}, std::deque{}); PrintVector(std::queue{}, std::queue{}, std::queue{}, std::queue{}); PrintList(std::_List_node{}, std::_List_node{}, std::_List_node{}, std::_List_node{}); PrintNode(std::set{}, std::set{}, std::set{}, std::set{}); PrintList(std::_Rb_tree_node{}, std::_Rb_tree_node{}, std::_Rb_tree_node{}, std::_Rb_tree_node{}); PrintNode(std::map{}, std::map{}, std::map{}, std::map{}); PrintList(std::_Rb_tree_node>{}, std::_Rb_tree_node>{}, std::_Rb_tree_node>{}, std::_Rb_tree_node>{}); PrintNode(std::unordered_set{}, std::unordered_set{}, std::unordered_set{}, std::unordered_set{}, std::unordered_set{}); PrintList(std::__detail::_Hash_node{}, std::__detail::_Hash_node{}, std::__detail::_Hash_node{}, std::__detail::_Hash_node{}); PrintNode(std::unordered_map{}, std::unordered_map{}, std::unordered_map{}, std::unordered_map{}); PrintList(std::__detail::_Hash_node, false>{}, std::__detail::_Hash_node, false>{}, std::__detail::_Hash_node, false>{}, std::__detail::_Hash_node, false>{}); return 0; }