diff --git a/examples/btree.cc b/examples/btree.cc index 60f187a..44dcc5c 100644 --- a/examples/btree.cc +++ b/examples/btree.cc @@ -1,5 +1,5 @@ #include -#include +#include "btree_fwd.h" #include int main() @@ -21,7 +21,7 @@ int main() for (auto& p: map) std::cout << p.first << ", " << p.second << '\n'; - phmap::btree_map map2; + IntString map2; // IntString is declared in btree_fwd.h map2.emplace(std::piecewise_construct, std::forward_as_tuple(0), std::forward_as_tuple(10, 'c')); map2.try_emplace(1, 10, 'a'); // phmap::btree_map supports c++17 API diff --git a/examples/btree_fwd.h b/examples/btree_fwd.h new file mode 100644 index 0000000..bd8c5e7 --- /dev/null +++ b/examples/btree_fwd.h @@ -0,0 +1,6 @@ +#include + +#include + +using IntString = phmap::btree_map; +