From 61bce309018a04d7c05d37bb0de22f9afac6307d Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 21 Nov 2017 06:30:19 -0700 Subject: [PATCH] Unused code removal --- .../chaiscript/dispatchkit/bootstrap_stl.hpp | 145 +----------------- 1 file changed, 2 insertions(+), 143 deletions(-) diff --git a/include/chaiscript/dispatchkit/bootstrap_stl.hpp b/include/chaiscript/dispatchkit/bootstrap_stl.hpp index df25c9ec..684096d4 100644 --- a/include/chaiscript/dispatchkit/bootstrap_stl.hpp +++ b/include/chaiscript/dispatchkit/bootstrap_stl.hpp @@ -178,13 +178,6 @@ namespace chaiscript detail::input_range_type_impl >(type,m); detail::input_range_type_impl >("Const_" + type,m); } - template - ModulePtr input_range_type(const std::string &type) - { - auto m = std::make_shared(); - input_range_type(type, *m); - return m; - } /// Add random_access_container concept to the given ContainerType @@ -197,7 +190,7 @@ namespace chaiscript m.add( fun( [](ContainerType &c, int index) -> typename ContainerType::reference { - /// \todo we are prefering to keep the key as 'int' to avoid runtime conversions + /// \todo we are preferring to keep the key as 'int' to avoid runtime conversions /// during dispatch. reevaluate return c.at(static_cast(index)); }), "[]"); @@ -205,19 +198,11 @@ namespace chaiscript m.add( fun( [](const ContainerType &c, int index) -> typename ContainerType::const_reference { - /// \todo we are prefering to keep the key as 'int' to avoid runtime conversions + /// \todo we are preferring to keep the key as 'int' to avoid runtime conversions /// during dispatch. reevaluate return c.at(static_cast(index)); }), "[]"); } - template - ModulePtr random_access_container_type(const std::string &type) - { - auto m = std::make_shared(); - random_access_container_type(type, *m); - return m; - } - /// Add assignable concept to the given ContainerType @@ -228,14 +213,6 @@ namespace chaiscript copy_constructor(type, m); operators::assign(m); } - template - ModulePtr assignable_type(const std::string &type) - { - auto m = std::make_shared(); - assignable_type(type, *m); - return m; - } - /// Add container resize concept to the given ContainerType /// http://www.cplusplus.com/reference/stl/ @@ -245,14 +222,6 @@ namespace chaiscript m.add(fun([](ContainerType *a, typename ContainerType::size_type n, const typename ContainerType::value_type& val) { return a->resize(n, val); } ), "resize"); m.add(fun([](ContainerType *a, typename ContainerType::size_type n) { return a->resize(n); } ), "resize"); } - template - ModulePtr resizable_type(const std::string &type) - { - auto m = std::make_shared(); - resizable_type(type, *m); - return m; - } - /// Add container reserve concept to the given ContainerType /// http://www.cplusplus.com/reference/stl/ @@ -262,14 +231,6 @@ namespace chaiscript m.add(fun([](ContainerType *a, typename ContainerType::size_type n) { return a->reserve(n); } ), "reserve"); m.add(fun([](const ContainerType *a) { return a->capacity(); } ), "capacity"); } - template - ModulePtr reservable_type(const std::string &type) - { - auto m = std::make_shared(); - reservable_type(type, *m); - return m; - } - /// Add container concept to the given ContainerType /// http://www.sgi.com/tech/stl/Container.html @@ -280,14 +241,6 @@ namespace chaiscript m.add(fun([](const ContainerType *a) { return a->empty(); } ), "empty"); m.add(fun([](ContainerType *a) { a->clear(); } ), "clear"); } - template - ModulePtr container_type(const std::string& type) - { - auto m = std::make_shared(); - container_type(type, *m); - return m; - } - /// Add default constructable concept to the given Type /// http://www.sgi.com/tech/stl/DefaultConstructible.html @@ -296,15 +249,6 @@ namespace chaiscript { m.add(constructor(), type); } - template - ModulePtr default_constructible_type(const std::string& type) - { - auto m = std::make_shared(); - default_constructible_type(type, *m); - return m; - } - - /// Add sequence concept to the given ContainerType /// http://www.sgi.com/tech/stl/Sequence.html @@ -322,13 +266,6 @@ namespace chaiscript m.add(fun(&detail::erase_at), "erase_at"); } - template - ModulePtr sequence_type(const std::string &type) - { - auto m = std::make_shared(); - sequence_type(type, *m); - return m; - } /// Add back insertion sequence concept to the given ContainerType /// http://www.sgi.com/tech/stl/BackInsertionSequence.html @@ -380,14 +317,6 @@ namespace chaiscript m.add(fun(&ContainerType::pop_back), "pop_back"); } - template - ModulePtr back_insertion_sequence_type(const std::string &type) - { - auto m = std::make_shared(); - back_insertion_sequence_type(type, *m); - return m; - } - /// Front insertion sequence @@ -442,14 +371,6 @@ namespace chaiscript m.add(fun(static_cast(&ContainerType::pop_front)), "pop_front"); } - template - ModulePtr front_insertion_sequence_type(const std::string &type) - { - auto m = std::make_shared(); - front_insertion_sequence_type(type, *m); - return m; - } - /// bootstrap a given PairType /// http://www.sgi.com/tech/stl/pair.html @@ -464,14 +385,6 @@ namespace chaiscript basic_constructors(type, m); m.add(constructor(), type); } - template - ModulePtr pair_type(const std::string &type) - { - auto m = std::make_shared(); - pair_type(type, *m); - return m; - } - /// Add pair associative container concept to the given ContainerType @@ -482,14 +395,6 @@ namespace chaiscript { pair_type(type + "_Pair", m); } - template - ModulePtr pair_associative_container_type(const std::string &type) - { - auto m = std::make_shared(); - pair_associative_container_type(type, *m); - return m; - } - /// Add unique associative container concept to the given ContainerType /// http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html @@ -513,14 +418,6 @@ namespace chaiscript } }()); } - template - ModulePtr unique_associative_container_type(const std::string &type) - { - auto m = std::make_shared(); - unique_associative_container_type(type, *m); - return m; - } - /// Add a MapType container /// http://www.sgi.com/tech/stl/Map.html @@ -568,14 +465,6 @@ namespace chaiscript pair_associative_container_type(type, m); input_range_type(type, m); } - template - ModulePtr map_type(const std::string &type) - { - auto m = std::make_shared(); - map_type(type, *m); - return m; - } - /// http://www.sgi.com/tech/stl/List.html template @@ -592,14 +481,6 @@ namespace chaiscript assignable_type(type, m); input_range_type(type, m); } - template - ModulePtr list_type(const std::string &type) - { - auto m = std::make_shared(); - list_type(type, m); - return m; - } - /// Create a vector type with associated concepts /// http://www.sgi.com/tech/stl/Vector.html @@ -665,13 +546,6 @@ namespace chaiscript ); } } - template - ModulePtr vector_type(const std::string &type) - { - auto m = std::make_shared(); - vector_type(type, *m); - return m; - } /// Add a String container /// http://www.sgi.com/tech/stl/basic_string.html @@ -715,14 +589,6 @@ namespace chaiscript m.add(fun([](const String *s) { return s->data(); } ), "data"); m.add(fun([](const String *s, size_t pos, size_t len) { return s->substr(pos, len); } ), "substr"); } - template - ModulePtr string_type(const std::string &type) - { - auto m = std::make_shared(); - string_type(type, *m); - return m; - } - /// Add a MapType container @@ -736,13 +602,6 @@ namespace chaiscript m.add(fun(&FutureType::get), "get"); m.add(fun(&FutureType::wait), "wait"); } - template - ModulePtr future_type(const std::string &type) - { - auto m = std::make_shared(); - future_type(type, *m); - return m; - } } } }