Go to the source code of this file.
Namespaces | |
namespace | instigate::generic |
namespace | instigate |
Classes | |
class | instigate::generic::require< 1 > |
Utility class for compile time checking. More... | |
class | instigate::generic::conversion< T, U > |
This class helps us to detect convertibility and inheritance at compile time. To see whether U is same type as T we can call:. More... | |
class | instigate::generic::conversion< T, U >::big |
class | instigate::generic::conversion< T, T > |
the specialization of conversion class when the template arguments are the same types. More... | |
struct | instigate::generic::int_to_type< t > |
generates distinct type for each integer. Here is an example where it may help us: More... | |
struct | instigate::generic::type_to_type< T > |
creates distinct type for each type. Below is an example where we can use it. Suppose we have a generic function: More... | |
Defines | |
#define | CHECK(R) {R();} |
Calls default constructor of the passed argument. | |
#define | CHECK_CONVERTIBILITY(T, U) |
Checks whether the types T and U are convertible to each other. | |
#define | CHECK_SAME_TYPE(T, U) |
Checks whether the types T and U are the same types. | |
#define | REQUIRE_SAME_TYPE(v1, v2) {require_same_type(v1, v2);} |
Requires the v1 and v2 to be the same type. |
Copyright © 2008-2010 Instigate CJSC, Armenia
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define CHECK | ( | R | ) | {R();} |
Calls default constructor of the passed argument.
In most cases it is the object of the requirements class for any concept/type.
Referenced by instigate::stl::accumulate(), instigate::stl::adjacent_difference(), instigate::stl::adjacent_find(), instigate::stl::advance(), instigate::stl::implementation::advance_aux(), instigate::stl::assign(), instigate::stl::binary_search(), instigate::stl::bind(), instigate::stl::bind1st(), instigate::stl::bind2nd(), instigate::stl::check_prerequisites(), instigate::stl::compose(), instigate::stl::const_dereference(), instigate::stl::copy(), instigate::stl::copy_backward(), instigate::stl::copy_constructor(), instigate::stl::copy_n(), instigate::stl::count(), instigate::stl::count_if(), instigate::stl::decrement(), instigate::stl::dereference(), instigate::stl::dereference_assign(), instigate::stl::distance(), instigate::stl::implementation::distance_aux(), instigate::stl::equal(), instigate::stl::equal_range(), instigate::stl::fill(), instigate::stl::fill_n(), instigate::stl::find(), instigate::stl::implementation::find_end_aux(), instigate::stl::find_first_of(), instigate::stl::find_if(), instigate::stl::for_each(), instigate::stl::generate(), instigate::stl::generate_n(), instigate::stl::includes(), instigate::stl::increment(), instigate::stl::initialize(), instigate::stl::inner_product(), instigate::stl::inplace_merge(), instigate::stl::invoke(), instigate::stl::invoke_predicate(), instigate::stl::iota(), instigate::stl::is_heap(), instigate::stl::is_sorted(), instigate::stl::iter_swap(), instigate::stl::less_than(), instigate::stl::lexicographical_compare_3way(), instigate::stl::lower_bound(), instigate::stl::make_heap(), instigate::stl::max(), instigate::stl::max_element(), instigate::stl::merge(), instigate::stl::min(), instigate::stl::min_element(), instigate::stl::mismatch(), instigate::stl::next_permutation(), instigate::stl::not1(), instigate::stl::not2(), instigate::stl::partial_sort_copy(), instigate::stl::partial_sum(), instigate::stl::partition(), instigate::stl::pop_heap(), instigate::stl::power(), instigate::stl::prev_permutation(), instigate::stl::push_heap(), instigate::stl::random_sample(), instigate::stl::random_sample_n(), instigate::stl::random_shuffle(), instigate::stl::remove(), instigate::stl::remove_copy(), instigate::stl::remove_copy_if(), instigate::stl::remove_if(), instigate::stl::replace(), instigate::stl::replace_copy(), instigate::stl::replace_copy_if(), instigate::stl::replace_if(), instigate::stl::pair::requirements< T >::requirements(), instigate::stl::implementation::reverse_aux(), instigate::stl::reverse_copy(), instigate::stl::rotate(), instigate::stl::implementation::rotate_aux(), instigate::stl::rotate_copy(), instigate::stl::search_n(), instigate::stl::set_difference(), instigate::stl::set_intersection(), instigate::stl::set_symmetric_difference(), instigate::stl::set_union(), instigate::stl::sort(), instigate::stl::sort_heap(), instigate::stl::stable_partition(), instigate::stl::stable_sort(), instigate::stl::swap(), instigate::stl::swap_ranges(), instigate::stl::tbind1st(), instigate::stl::tbind2nd(), instigate::stl::tbind3rd(), instigate::stl::transform(), instigate::stl::implementation::unguarded_partition(), instigate::stl::unique(), instigate::stl::unique_copy(), and instigate::stl::upper_bound().
#define CHECK_CONVERTIBILITY | ( | T, | |||
U | ) |
Value:
{\ instigate::generic::require<instigate::\ generic::conversion<T, U>::exists>();}
Checks is there an implicit conversion from T to U.
Referenced by instigate::stl::accumulate(), instigate::stl::adjacent_difference(), instigate::stl::bind(), instigate::stl::bind1st(), instigate::stl::bind2nd(), instigate::stl::compose(), instigate::stl::copy(), instigate::stl::copy_backward(), instigate::stl::copy_n(), instigate::stl::equal(), instigate::stl::implementation::equal_range_aux(), instigate::stl::fill(), instigate::stl::fill_n(), instigate::stl::implementation::find_end_aux(), instigate::stl::find_first_of(), instigate::stl::generate(), instigate::stl::generate_n(), instigate::stl::inner_product(), instigate::stl::inplace_merge(), instigate::stl::iota(), instigate::stl::is_sorted(), instigate::stl::lexicographical_compare(), instigate::stl::implementation::lower_bound_aux(), instigate::stl::max(), instigate::stl::max_element(), instigate::stl::merge(), instigate::stl::min(), instigate::stl::min_element(), instigate::stl::mismatch(), instigate::stl::partial_sum(), instigate::stl::random_sample(), instigate::stl::random_sample_n(), instigate::stl::random_shuffle(), instigate::stl::remove_copy(), instigate::stl::remove_copy_if(), instigate::stl::remove_if(), instigate::stl::replace(), instigate::stl::replace_copy(), instigate::stl::replace_copy_if(), instigate::stl::replace_if(), instigate::stl::unary_predicate::requirements< T >::require_convertibility_of_result_type_to_bool(), instigate::stl::binary_predicate::requirements< T >::require_convertibility_of_result_type_to_bool(), instigate::stl::set_difference(), instigate::stl::set_intersection(), instigate::stl::set_symmetric_difference(), instigate::stl::set_union(), instigate::stl::stable_sort(), instigate::stl::tbind1st(), instigate::stl::tbind2nd(), instigate::stl::tbind3rd(), instigate::stl::transform(), and instigate::stl::implementation::upper_bound_aux().
#define CHECK_SAME_TYPE | ( | T, | |||
U | ) |
Value:
{\ instigate::generic::require<instigate::\ generic::conversion<T, U>::same_type>();}
Referenced by instigate::stl::binary_search(), instigate::stl::equal_range(), instigate::stl::includes(), instigate::stl::iter_swap(), instigate::stl::lower_bound(), instigate::stl::merge(), instigate::stl::partial_sort_copy(), instigate::stl::implementation::partial_sort_copy_aux(), instigate::stl::set_difference(), instigate::stl::set_intersection(), instigate::stl::set_symmetric_difference(), instigate::stl::set_union(), and instigate::stl::upper_bound().