├── .gitignore ├── .gitmodules ├── .travis.yml ├── CMakeLists.txt ├── Doxyfile.in ├── LICENSE_1_0.txt ├── README.md ├── examples ├── algorithm_example.hpp ├── algorithm_variadic_example.hpp ├── lambda_example.hpp ├── main.cpp ├── map_example.hpp ├── ratio_example.hpp ├── string_example.hpp ├── value_map_example.hpp └── vector_example.hpp ├── test ├── test_tinympl.cpp └── tinympl │ ├── accumulate.cpp │ ├── algorithm.cpp │ ├── algorithm_variadic.cpp │ ├── all_of.cpp │ ├── and_b.cpp │ ├── any_of.cpp │ ├── apply.cpp │ ├── as_sequence.cpp │ ├── at.cpp │ ├── bind.cpp │ ├── bool.cpp │ ├── char.cpp │ ├── copy.cpp │ ├── copy_if.cpp │ ├── copy_n.cpp │ ├── count.cpp │ ├── count_if.cpp │ ├── divides.cpp │ ├── equal_to.cpp │ ├── erase.cpp │ ├── fill_n.cpp │ ├── find.cpp │ ├── find_if.cpp │ ├── functional.cpp │ ├── fused_map.cpp │ ├── fused_value_map.cpp │ ├── generate_n.cpp │ ├── greater.cpp │ ├── greater_equal.cpp │ ├── identity.cpp │ ├── if.cpp │ ├── inherit.cpp │ ├── insert.cpp │ ├── int.cpp │ ├── is_sequence.cpp │ ├── is_unique.cpp │ ├── join.cpp │ ├── lambda.cpp │ ├── left_fold.cpp │ ├── less.cpp │ ├── less_equal.cpp │ ├── lexicographical_compare.cpp │ ├── logical_and.cpp │ ├── logical_not.cpp │ ├── logical_or.cpp │ ├── long.cpp │ ├── map.cpp │ ├── max_element.cpp │ ├── min_element.cpp │ ├── minus.cpp │ ├── modulus.cpp │ ├── multiplies.cpp │ ├── negate.cpp │ ├── none_of.cpp │ ├── not_b.cpp │ ├── not_equal_to.cpp │ ├── or_b.cpp │ ├── plus.cpp │ ├── ratio.cpp │ ├── remove.cpp │ ├── remove_if.cpp │ ├── replace.cpp │ ├── replace_if.cpp │ ├── reverse.cpp │ ├── right_fold.cpp │ ├── sequence.cpp │ ├── set_difference.cpp │ ├── set_intersection.cpp │ ├── set_union.cpp │ ├── short.cpp │ ├── size.cpp │ ├── sizeof.cpp │ ├── sort.cpp │ ├── string.cpp │ ├── string_macro.cpp │ ├── test_config.hpp │ ├── to_string.cpp │ ├── transform.cpp │ ├── transform2.cpp │ ├── transform_many.cpp │ ├── transpose.cpp │ ├── unique.cpp │ ├── unit_test.hpp │ ├── unordered_equal.cpp │ ├── value_map.cpp │ ├── variadic.cpp │ ├── variadic │ ├── accumulate.cpp │ ├── all_of.cpp │ ├── any_of.cpp │ ├── at.cpp │ ├── copy.cpp │ ├── copy_if.cpp │ ├── copy_n.cpp │ ├── count.cpp │ ├── count_if.cpp │ ├── erase.cpp │ ├── fill_n.cpp │ ├── find.cpp │ ├── find_if.cpp │ ├── generate_n.cpp │ ├── insert.cpp │ ├── is_unique.cpp │ ├── left_fold.cpp │ ├── max_element.cpp │ ├── min_element.cpp │ ├── none_of.cpp │ ├── remove.cpp │ ├── remove_if.cpp │ ├── replace.cpp │ ├── replace_if.cpp │ ├── reverse.cpp │ ├── right_fold.cpp │ ├── size.cpp │ ├── sort.cpp │ ├── transform.cpp │ └── unique.cpp │ ├── vector.cpp │ └── zip.cpp └── tinympl ├── accumulate.hpp ├── algorithm.hpp ├── algorithm_variadic.hpp ├── all_of.hpp ├── and_b.hpp ├── any_of.hpp ├── apply.hpp ├── as_sequence.hpp ├── at.hpp ├── bind.hpp ├── bool.hpp ├── char.hpp ├── copy.hpp ├── copy_if.hpp ├── copy_n.hpp ├── count.hpp ├── count_if.hpp ├── divides.hpp ├── equal_to.hpp ├── erase.hpp ├── fill_n.hpp ├── find.hpp ├── find_if.hpp ├── functional.hpp ├── fused_map.hpp ├── fused_value_map.hpp ├── generate_n.hpp ├── greater.hpp ├── greater_equal.hpp ├── identity.hpp ├── if.hpp ├── inherit.hpp ├── insert.hpp ├── int.hpp ├── is_sequence.hpp ├── is_unique.hpp ├── join.hpp ├── lambda.hpp ├── left_fold.hpp ├── less.hpp ├── less_equal.hpp ├── lexicographical_compare.hpp ├── logical_and.hpp ├── logical_not.hpp ├── logical_or.hpp ├── long.hpp ├── map.hpp ├── max_element.hpp ├── min_element.hpp ├── minus.hpp ├── modulus.hpp ├── multiplies.hpp ├── negate.hpp ├── none_of.hpp ├── not_b.hpp ├── not_equal_to.hpp ├── or_b.hpp ├── plus.hpp ├── ratio.hpp ├── remove.hpp ├── remove_if.hpp ├── replace.hpp ├── replace_if.hpp ├── reverse.hpp ├── right_fold.hpp ├── sequence.hpp ├── set_difference.hpp ├── set_intersection.hpp ├── set_union.hpp ├── short.hpp ├── size.hpp ├── sizeof.hpp ├── sort.hpp ├── string.hpp ├── string_macro.hpp ├── to_string.hpp ├── transform.hpp ├── transform2.hpp ├── transform_many.hpp ├── transpose.hpp ├── unique.hpp ├── unordered_equal.hpp ├── value_map.hpp ├── variadic.hpp ├── variadic ├── accumulate.hpp ├── all_of.hpp ├── any_of.hpp ├── at.hpp ├── copy.hpp ├── copy_if.hpp ├── copy_n.hpp ├── count.hpp ├── count_if.hpp ├── erase.hpp ├── fill_n.hpp ├── find.hpp ├── find_if.hpp ├── generate_n.hpp ├── insert.hpp ├── is_unique.hpp ├── left_fold.hpp ├── max_element.hpp ├── min_element.hpp ├── none_of.hpp ├── remove.hpp ├── remove_if.hpp ├── replace.hpp ├── replace_if.hpp ├── reverse.hpp ├── right_fold.hpp ├── size.hpp ├── sort.hpp ├── transform.hpp └── unique.hpp ├── vector.hpp └── zip.hpp /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbabbi/tinympl/46ef3c2ad4f983b3b564875900d31074270dbca7/.gitmodules -------------------------------------------------------------------------------- /LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | tinympl 2 | ======= 3 | 4 | [![Build Status](https://travis-ci.org/sbabbi/tinympl.svg?branch=master)](https://travis-ci.org/sbabbi/tinympl) 5 | 6 | **Tinympl** implements some useful C++ template meta-programming algorithms. 7 | Most of this work is inspired by [Boost.MPL](http://www.boost.org/doc/libs/1_55_0/libs/mpl/doc/index.html). 8 | Unlike Boost.MPL, this package makes use of the C++11 features, resulting in a much smaller code base. 9 | 10 | Main features: 11 | 12 | * Extensive algorithm library which works both with variadic templates and with (possibly user-defined) template types (like `std::tuple`). 13 | * Compile-time containers, like `map`, `vector` and `string`. 14 | * Mixed (compile-time / real-time) `map` types. 15 | 16 | [Full doxygen documentation](http://sbabbi.github.io/tinympl/). 17 | -------------------------------------------------------------------------------- /examples/lambda_example.hpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | namespace test_lambda 6 | { 7 | 8 | using namespace tinympl; 9 | 10 | template using myf = lambda< 11 | if_< 12 | bind >, // equal_to< int_<0>, modulus > >, 13 | plus< arg1, int_<8> >, 14 | multiplies< arg1, int_<5> > > 15 | >::template eval; 16 | 17 | static_assert( myf >::type::value == 20,"lambda"); 18 | static_assert( myf >::type::value == 13,"lambda"); 19 | 20 | template using myf2 = lambda< 21 | if_< arg1, 22 | protect >, 23 | protect > > 24 | >::template eval_t,U>; 25 | 26 | static_assert( std::is_same< 27 | myf2, 28 | std::vector 29 | >::value && 30 | std::is_same< 31 | myf2, 32 | std::vector 33 | >::value,"lambda"); 34 | } 35 | -------------------------------------------------------------------------------- /examples/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "algorithm_example.hpp" 4 | #include "algorithm_variadic_example.hpp" 5 | #include "lambda_example.hpp" 6 | #include "map_example.hpp" 7 | #include "ratio_example.hpp" 8 | #include "string_example.hpp" 9 | #include "value_map_example.hpp" 10 | #include "vector_example.hpp" 11 | 12 | #include 13 | #include 14 | 15 | using namespace std; 16 | 17 | void test_fused_map() 18 | { 19 | typedef tinympl::fused_map< 20 | std::pair, 21 | std::pair, 22 | std::pair, 23 | std::pair > fmap; 24 | 25 | fmap mm ("Hello","intptr",'c',44L); 26 | 27 | assert(mm.at() == "Hello"); 28 | assert(mm.at() == 44L); 29 | assert(mm.at() == 'c'); 30 | assert(mm.at() == "intptr"); 31 | } 32 | 33 | void test_fused_value_map() 34 | { 35 | typedef tinympl::fused_value_map fmap; 36 | fmap mm = {{"int","char","long","string"}}; 37 | 38 | assert( mm.at<6>() == "int"); 39 | assert( mm.at<4>() == "char"); 40 | assert( mm.at<12>() == "long"); 41 | assert( mm.at<18>() == "string"); 42 | } 43 | 44 | MAKE_TINYMPL_STRING(str_hello_world,"Hello World"); 45 | 46 | void test_runtime_string() 47 | { 48 | assert( str_hello_world::c_str() == std::string("Hello World") ); 49 | } 50 | 51 | int main() 52 | { 53 | test_fused_map(); 54 | test_fused_value_map(); 55 | test_runtime_string(); 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /examples/map_example.hpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | namespace map_example { 7 | 8 | using tinympl::char_; 9 | using tinympl::int_; 10 | 11 | typedef tinympl::map< 12 | std::pair,int_<0>>, 13 | std::pair,int_<1>>, 14 | std::pair,int_<2>>, 15 | std::pair,int_<3>>, 16 | std::pair,int_<25> > > char_map_t0; 17 | 18 | static_assert(char_map_t0::size == 5 && char_map_t0::empty == false,"size && empty"); 19 | static_assert(char_map_t0::count >::type::value == 1 && 20 | char_map_t0::count >::type::value == 0,"map::count"); 21 | static_assert(char_map_t0::at >::type::value == 1,"map::at"); 22 | 23 | typedef char_map_t0::erase >::type char_map_t1; 24 | typedef char_map_t0::insert,int_<4> >::type char_map_t2; 25 | 26 | static_assert(char_map_t1::size == 4,"erase"); 27 | static_assert(char_map_t2::size == 6,"insert"); 28 | 29 | typedef char_map_t0::insert_many< 30 | std::pair,int_<4> >, 31 | std::pair,int_<5> >, 32 | std::pair,int_<6> >, 33 | std::pair,int_<7> >, 34 | std::pair,int_<8> > >::type char_map_t3; 35 | 36 | static_assert( char_map_t3::at >::type::value == 0, "insert_many"); 37 | static_assert( char_map_t3::at >::type::value == 7, "insert_many"); 38 | static_assert( char_map_t3::size == 9, "insert_many"); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /examples/ratio_example.hpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | using namespace tinympl; 6 | 7 | namespace ratio_example 8 | { 9 | 10 | typedef std::tuple< 11 | std::ratio<5,8>, 12 | std::ratio<4,3>, 13 | std::ratio<16,8>, 14 | std::ratio<4,2>, 15 | std::ratio<2,3> 16 | > seq1; 17 | 18 | static_assert(max_element::value == 2,"ratio - max element"); 19 | 20 | static_assert( 21 | std::is_same< 22 | sort::type, 23 | std::tuple< 24 | rational<5,8>, 25 | rational<2,3>, 26 | rational<4,3>, 27 | std::ratio<16,8>, 28 | std::ratio<4,2> 29 | > 30 | >::value,"ratio - sort"); 31 | 32 | static_assert( 33 | std::is_same< 34 | std::ratio<4,2>, 35 | std::ratio<8,4> >::value == false, "std::ratio compare example"); 36 | 37 | static_assert( 38 | equal_to< 39 | std::ratio<4,2>, 40 | std::ratio<8,4> >::value == true, "equal_to compare example"); 41 | 42 | static_assert( 43 | std::is_same< 44 | rational<4,2>, 45 | rational<8,4> >::value == true, "rational compare example"); 46 | } 47 | -------------------------------------------------------------------------------- /examples/value_map_example.hpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | namespace value_map_example { 5 | 6 | template using ci_pair = tinympl::value_map::template pair; 7 | 8 | typedef tinympl::value_map, 10 | ci_pair<'b',1>, 11 | ci_pair<'c',2>, 12 | ci_pair<'d',3>, 13 | ci_pair<'e',4>, 14 | ci_pair<'z',25> > vv_map_t0; 15 | 16 | static_assert( vv_map_t0::at<'c'>::value == 2,"vv_map::at"); 17 | static_assert( vv_map_t0::at<'z'>::value == 25,"vv_map::at"); 18 | static_assert( vv_map_t0::size == 6,"vv_map::size"); 19 | static_assert( vv_map_t0::count<'e'>::type::value == true && 20 | vv_map_t0::count<'g'>::type::value == false,"vv_map::count"); 21 | 22 | typedef vv_map_t0::insert<'f',5>::type vv_map_t1; 23 | static_assert( vv_map_t1::at<'f'>::value == 5,"vv_map::insert"); 24 | 25 | typedef vv_map_t0::erase<'z'>::type vv_map_t2; 26 | static_assert( vv_map_t2::count<'z'>::value == 0, "vv_map::erase"); 27 | 28 | typedef vv_map_t0::insert_many< 29 | ci_pair<'f',5>, 30 | ci_pair<'g',6>, 31 | ci_pair<'h',7>, 32 | ci_pair<'a',8> >::type vv_map_t3; 33 | 34 | static_assert( vv_map_t3::at<'a'>::type::value == 0, "insert_many"); 35 | static_assert( vv_map_t3::at<'h'>::type::value == 7, "insert_many"); 36 | static_assert( vv_map_t3::size == 9, "insert_many"); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /examples/vector_example.hpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | namespace vector_example 5 | { 6 | 7 | typedef tinympl::vector v1; 8 | 9 | static_assert( v1::size == 3,"size"); 10 | static_assert( std::is_same< v1::at<1>::type,long>::value,"at"); 11 | 12 | typedef v1::push_back::type v2; 13 | static_assert( std::is_same < v2::at<3>::type,std::string>::value,"push_back"); 14 | 15 | typedef v2::push_front::type v3; 16 | static_assert( std::is_same < v3::at<0>::type,double>::value,"push_front"); 17 | 18 | typedef v1::pop_back::type v4; 19 | static_assert( std::is_same< v4, tinympl::vector >::value,"pop_back"); 20 | 21 | typedef v4::pop_front::type v5; 22 | static_assert( std::is_same< v5, tinympl::vector >::value,"pop_front"); 23 | 24 | typedef v1::insert<1,float,float,char>::type v6; 25 | static_assert( std::is_same< v6, tinympl::vector >::value,"insert"); 26 | 27 | typedef v6::erase<0,3>::type v7; 28 | static_assert( std::is_same< v7, tinympl::vector >::value,"erase"); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /test/test_tinympl.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | #define TINYMPL_TEST_MODULE test_tinympl 14 | #include 15 | -------------------------------------------------------------------------------- /test/tinympl/accumulate.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ACCUMULATE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/accumulate.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(accumulate) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ACCUMULATE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/algorithm.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ALGORITHM_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/algorithm.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(algorithm) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ALGORITHM_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/algorithm_variadic.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ALGORITHM_VARIADIC_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/algorithm_variadic.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(algorithm_variadic) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ALGORITHM_VARIADIC_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/all_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ALL_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/all_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(all_of) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ALL_OF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/and_b.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_AND_B_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/and_b.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(and_b) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_AND_B_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/any_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ANY_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/any_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(any_of) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ANY_OF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/apply.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_APPLY_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/apply.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(apply) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_APPLY_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/as_sequence.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_AS_SEQUENCE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/as_sequence.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(as_sequence) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_AS_SEQUENCE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/at.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_AT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/at.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(at) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_AT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/bind.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_BIND_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/bind.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(bind) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_BIND_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/bool.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_BOOL_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/bool.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(bool_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_BOOL_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/char.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_CHAR_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/char.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(char_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_CHAR_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/copy.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_COPY_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/copy.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(copy) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_COPY_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/copy_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_COPY_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/copy_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(copy_if) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_COPY_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/copy_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_COPY_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/copy_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(copy_n) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_COPY_N_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/count.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_COUNT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/count.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(count) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_COUNT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/count_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_COUNT_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/count_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(count_if) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_COUNT_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/divides.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_DIVIDES_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/divides.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(divides) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_DIVIDES_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/equal_to.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_EQUAL_TO_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/equal_to.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(equal_to) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_EQUAL_TO_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/erase.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ERASE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/erase.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(erase) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ERASE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/fill_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FILL_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/fill_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(fill_n) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FILL_N_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/find.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FIND_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/find.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(find) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FIND_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/find_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FIND_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/find_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(find_if) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FIND_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/functional.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FUNCTIONAL_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/functional.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(functional) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FUNCTIONAL_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/fused_map.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FUSED_MAP_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/fused_map.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(fused_map) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FUSED_MAP_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/fused_value_map.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_FUSED_VALUE_MAP_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/fused_value_map.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(fused_value_map) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_FUSED_VALUE_MAP_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/generate_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_GENERATE_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/generate_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(generate_n) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_GENERATE_N_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/greater.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_GREATER_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/greater.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(greater) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_GREATER_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/greater_equal.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_GREATER_EQUAL_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/greater_equal.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(greater_equal) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_GREATER_EQUAL_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/identity.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_IDENTITY_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/identity.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(identity) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_IDENTITY_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(if_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/inherit.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_INHERIT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/inherit.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(inherit) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_INHERIT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/insert.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_INSERT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/insert.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(insert) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_INSERT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/int.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_INT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/int.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(int_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_INT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/is_sequence.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_IS_SEQUENCE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/is_sequence.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(is_sequence) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_IS_SEQUENCE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/is_unique.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_IS_UNIQUE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/is_unique.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(is_unique) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_IS_UNIQUE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/join.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_JOIN_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/join.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(join) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_JOIN_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/lambda.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LAMBDA_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/lambda.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(lambda) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LAMBDA_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/left_fold.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LEFT_FOLD_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/left_fold.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(left_fold) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LEFT_FOLD_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/less.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LESS_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/less.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(less) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LESS_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/less_equal.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LESS_EQUAL_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/less_equal.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(less_equal) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LESS_EQUAL_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/lexicographical_compare.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LEXICOGRAPHICAL_COMPARE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/lexicographical_compare.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(lexicographical_compare) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LEXICOGRAPHICAL_COMPARE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/logical_and.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LOGICAL_AND_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/logical_and.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(logical_and) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LOGICAL_AND_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/logical_not.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LOGICAL_NOT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/logical_not.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(logical_not) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LOGICAL_NOT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/logical_or.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LOGICAL_OR_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/logical_or.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(logical_or) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LOGICAL_OR_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/long.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_LONG_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/long.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(long_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_LONG_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/map.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MAP_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/map.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(map) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MAP_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/max_element.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MAX_ELEMENT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/max_element.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(max_element) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MAX_ELEMENT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/min_element.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MIN_ELEMENT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/min_element.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(min_element) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MIN_ELEMENT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/minus.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MINUS_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/minus.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(minus) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MINUS_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/modulus.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MODULUS_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/modulus.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(modulus) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MODULUS_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/multiplies.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_MULTIPLIES_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/multiplies.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(multiplies) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_MULTIPLIES_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/negate.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_NEGATE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/negate.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(negate) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_NEGATE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/none_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_NONE_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/none_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(none_of) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_NONE_OF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/not_b.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_NOT_B_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/not_b.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(not_b) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_NOT_B_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/not_equal_to.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_NOT_EQUAL_TO_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/not_equal_to.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(not_equal_to) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_NOT_EQUAL_TO_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/or_b.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_OR_B_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/or_b.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(or_b) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_OR_B_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/plus.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_PLUS_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/plus.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(plus) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_PLUS_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/ratio.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_RATIO_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/ratio.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(ratio) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_RATIO_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/remove.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_REMOVE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/remove.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(remove) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_REMOVE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/remove_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_REMOVE_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/remove_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(remove_if) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_REMOVE_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/replace.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_REPLACE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/replace.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(replace) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_REPLACE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/replace_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_REPLACE_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/replace_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(replace_if) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_REPLACE_IF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/reverse.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_REVERSE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/reverse.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(reverse) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_REVERSE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/right_fold.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_RIGHT_FOLD_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/right_fold.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(right_fold) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_RIGHT_FOLD_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/sequence.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SEQUENCE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/sequence.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(sequence) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SEQUENCE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/set_difference.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SET_DIFFERENCE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/set_difference.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(set_difference) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SET_DIFFERENCE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/set_intersection.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SET_INTERSECTION_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/set_intersection.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(set_intersection) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SET_INTERSECTION_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/set_union.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SET_UNION_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/set_union.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(set_union) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SET_UNION_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/short.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SHORT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/short.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(short_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SHORT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/size.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SIZE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/size.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(size) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SIZE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/sizeof.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SIZEOF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/sizeof.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(sizeof_) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SIZEOF_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/sort.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_SORT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/sort.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(sort) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_SORT_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/string.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_STRING_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/string.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(string) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_STRING_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/string_macro.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_STRING_MACRO_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/string_macro.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(string_macro) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_STRING_MACRO_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/to_string.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_TO_STRING_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/to_string.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(to_string) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_TO_STRING_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/transform.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_TRANSFORM_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/transform.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(transform) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_TRANSFORM_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/transform2.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_TRANSFORM2_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/transform2.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(transform2) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_TRANSFORM2_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/transform_many.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_TRANSFORM_MANY_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/transform_many.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(transform_many) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_TRANSFORM_MANY_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/transpose.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_TRANSPOSE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/transpose.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(transpose) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_TRANSPOSE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/unique.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_UNIQUE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/unique.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(unique) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_UNIQUE_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/unit_test.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | #ifndef TINYMPL_UNIT_TEST_HPP 14 | #define TINYMPL_UNIT_TEST_HPP 15 | 16 | #ifdef TINYMPL_TEST_MODULE 17 | # define BOOST_TEST_MODULE TINYMPL_TEST_MODULE 18 | #endif 19 | #include 20 | 21 | #endif // TINYMPL_UNIT_TEST_HPP 22 | -------------------------------------------------------------------------------- /test/tinympl/unordered_equal.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_UNORDERED_EQUAL_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/unordered_equal.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(unordered_equal) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_UNORDERED_EQUAL_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/value_map.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VALUE_MAP_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/value_map.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(value_map) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_VALUE_MAP_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/variadic.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_VARIADIC_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/variadic/accumulate.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_ACCUMULATE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/accumulate.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(accumulate) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_ACCUMULATE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/all_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_ALL_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/all_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(all_of) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_ALL_OF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/any_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_ANY_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/any_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(any_of) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_ANY_OF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/at.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_AT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/at.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(at) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_AT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/copy.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_COPY_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/copy.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(copy) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_COPY_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/copy_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_COPY_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/copy_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(copy_if) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_COPY_IF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/copy_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_COPY_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/copy_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(copy_n) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_COPY_N_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/count.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_COUNT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/count.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(count) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_COUNT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/count_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_COUNT_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/count_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(count_if) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_COUNT_IF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/erase.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_ERASE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/erase.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(erase) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_ERASE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/fill_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_FILL_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/fill_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(fill_n) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_FILL_N_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/find.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_FIND_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/find.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(find) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_FIND_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/find_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_FIND_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/find_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(find_if) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_FIND_IF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/generate_n.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_GENERATE_N_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/generate_n.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(generate_n) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_GENERATE_N_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/insert.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_INSERT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/insert.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(insert) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_INSERT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/is_unique.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_IS_UNIQUE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/is_unique.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(is_unique) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_IS_UNIQUE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/left_fold.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_LEFT_FOLD_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/left_fold.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(left_fold) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_LEFT_FOLD_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/max_element.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_MAX_ELEMENT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/max_element.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(max_element) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_MAX_ELEMENT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/min_element.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_MIN_ELEMENT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/min_element.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(min_element) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_MIN_ELEMENT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/none_of.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_NONE_OF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/none_of.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(none_of) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_NONE_OF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/remove.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_REMOVE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/remove.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(remove) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_REMOVE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/remove_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_REMOVE_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/remove_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(remove_if) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_REMOVE_IF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/replace.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_REPLACE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/replace.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(replace) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_REPLACE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/replace_if.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_REPLACE_IF_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/replace_if.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(replace_if) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_REPLACE_IF_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/reverse.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_REVERSE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/reverse.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(reverse) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_REVERSE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/right_fold.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_RIGHT_FOLD_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/right_fold.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(right_fold) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_RIGHT_FOLD_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/size.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_SIZE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/size.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(size) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_SIZE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/sort.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_SORT_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/sort.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(sort) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_SORT_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/transform.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_TRANSFORM_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/transform.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(transform) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_TRANSFORM_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/variadic/unique.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VARIADIC_UNIQUE_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/variadic/unique.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(variadic) 25 | BOOST_AUTO_TEST_SUITE(unique) 26 | 27 | BOOST_AUTO_TEST_CASE(always_pass) 28 | { 29 | BOOST_CHECK( true ); 30 | } 31 | 32 | BOOST_AUTO_TEST_SUITE_END() 33 | BOOST_AUTO_TEST_SUITE_END() 34 | BOOST_AUTO_TEST_SUITE_END() 35 | 36 | #endif // TINYMPL_VARIADIC_UNIQUE_TEST_ENABLED 37 | -------------------------------------------------------------------------------- /test/tinympl/vector.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_VECTOR_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/vector.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(vector) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_VECTOR_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /test/tinympl/zip.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro, 2 | // Copyright (C) 2014, Pawel Tomulik. 3 | // 4 | // Use, modification, and distribution is subject to the Boost Software 5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | // See http://sbabbi.github.io/tinympl for documentation. 9 | // 10 | // You are welcome to contact the authors at: 11 | // enniobarbaro@gmail.com, ptomulik@meil.pw.edu.pl 12 | // 13 | 14 | #include 15 | 16 | #if TINYMPL_ZIP_TEST_ENABLE 17 | 18 | // Order of includes is important! 19 | // First, include tinympl/zip.hpp, then 20 | #include 21 | #include 22 | 23 | BOOST_AUTO_TEST_SUITE(test_tinympl) 24 | BOOST_AUTO_TEST_SUITE(zip) 25 | 26 | BOOST_AUTO_TEST_CASE(always_pass) 27 | { 28 | BOOST_CHECK( true ); 29 | } 30 | 31 | BOOST_AUTO_TEST_SUITE_END() 32 | BOOST_AUTO_TEST_SUITE_END() 33 | 34 | #endif // TINYMPL_ZIP_TEST_ENABLED 35 | -------------------------------------------------------------------------------- /tinympl/accumulate.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_ACCUMULATE_HPP 14 | #define TINYMPL_ACCUMULATE_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup SeqFold 22 | * \class accumulate 23 | * \brief Alias for left_fold. 24 | * \see left_fold 25 | * \sa variadic::accumulate 26 | */ 27 | template class F> 28 | struct accumulate : left_fold {}; 29 | 30 | } // namespace tinympl 31 | 32 | #endif // TINYMPL_ACCUMULATE_HPP 33 | -------------------------------------------------------------------------------- /tinympl/all_of.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_ALL_OF_HPP 14 | #define TINYMPL_ALL_OF_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class all_of 25 | * \brief Determines whether every element in the sequence satisfies the given 26 | predicate 27 | * \param Sequence the input sequence 28 | * \param F the predicate, `F::type::value` must be convertible to `bool` 29 | * \return `all_of<...>::type` is a `std::integral_constant` where `v` 30 | is true iff all the elements in the sequence satisfy the predicate `F` 31 | * \sa variadic::all_of 32 | */ 33 | template< class Sequence, template class F> 34 | struct all_of : all_of, F> {}; 35 | 36 | template< template class F, class ... Args> 37 | struct all_of, F > : variadic::all_of {}; 38 | 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_ALL_OF_HPP 42 | -------------------------------------------------------------------------------- /tinympl/and_b.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_AND_B_HPP 14 | #define TINYMPL_AND_B_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | template struct and_b; 21 | template struct and_b : std::integral_constant::value > {}; 22 | template struct and_b : std::integral_constant {}; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_AND_B_HPP 27 | -------------------------------------------------------------------------------- /tinympl/any_of.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_ANY_OF_HPP 14 | #define TINYMPL_ANY_OF_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class any_of 25 | * \brief Determines whether any of the elements in the sequence satisfy the 26 | given predicate 27 | * \param Sequence the input sequence 28 | * \param F the predicate, `F::type::value` must be convertible to `bool` 29 | * \return `any_of<...>::type` is a `std::integral_constant` where `v` 30 | is true iff at least one element in the sequence satisfy the predicate `F` 31 | * \sa variadic::any_of 32 | */ 33 | template< class Sequence, template class F> 34 | struct any_of : any_of, F> {}; 35 | 36 | template< template class F, class ... Args> 37 | struct any_of, F > : variadic::any_of {}; 38 | 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_ANY_OF_HPP 42 | -------------------------------------------------------------------------------- /tinympl/apply.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_APPLY_HPP 14 | #define TINYMPL_APPLY_HPP 15 | 16 | namespace tinympl { 17 | 18 | /** 19 | * \ingroup Functional 20 | * \class apply 21 | * \brief Return the result type of the metafunction class F called with arguments Args.,, 22 | */ 23 | template struct apply 24 | { 25 | typedef typename F::template eval::type type; 26 | }; 27 | 28 | template 29 | using apply_t = typename apply::type; 30 | 31 | } // namespace tinympl 32 | 33 | #endif // TINYMPL_APPLY_HPP 34 | -------------------------------------------------------------------------------- /tinympl/at.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_AT_HPP 14 | #define TINYMPL_AT_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqAlgsIntr 24 | * \class at 25 | * \brief Get the i-th element of a sequence 26 | * \param I The index of the desired element 27 | * \param Seq The input sequence 28 | */ 29 | template 30 | struct at : at > {}; 31 | 32 | template 33 | struct at > : variadic::at {}; 34 | 35 | } // namespace tinympl 36 | 37 | #endif // TINYMPL_AT_HPP 38 | -------------------------------------------------------------------------------- /tinympl/bool.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_BOOL_HPP 14 | #define TINYMPL_BOOL_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | //! \ingroup NewTypes 21 | //! Compile time bool 22 | template using bool_ = std::integral_constant; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_BOOL_HPP 27 | -------------------------------------------------------------------------------- /tinympl/char.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_CHAR_HPP 14 | #define TINYMPL_CHAR_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | //! \ingroup NewTypes 21 | //! Compile time char 22 | template using char_ = std::integral_constant; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_CHAR_HPP 27 | -------------------------------------------------------------------------------- /tinympl/copy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_COPY_HPP 14 | #define TINYMPL_COPY_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqModAlgs 24 | * \class copy 25 | * \brief Copy the elements from the input sequence to the output sequence 26 | * \param SequenceIn The input sequence 27 | * \param Out The output sequence type - defaults to the same sequence kind of 28 | the input sequence 29 | * \return `copy<...>::type` is a type templated from `Out` which is constructed 30 | with the elements of SequenceIn. 31 | * \sa variadic::copy 32 | */ 33 | template< class SequenceIn, 34 | template class Out = as_sequence::template rebind> 35 | struct copy : copy, Out> {}; 36 | 37 | template class Out, class ... Args> 38 | struct copy, Out> : variadic::copy {}; 39 | 40 | } // namespace tinympl 41 | 42 | #endif // TINYMPL_COPY_HPP 43 | -------------------------------------------------------------------------------- /tinympl/count.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_COUNT_HPP 14 | #define TINYMPL_COUNT_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class count 25 | * \brief Counts the number of elements in a sequence equal to a given one 26 | * \param Sequence The input sequence 27 | * \param T the type to be tested. 28 | * \return `count<...>::type` is `std::integral_constant` where 29 | `V` is the number of elements in the sequence equal to `T` 30 | * \note The comparison is done with \ref tinympl::equal_to - it can be 31 | specialized. 32 | * \sa variadic::count 33 | */ 34 | template 35 | struct count : count, T > {}; 36 | 37 | template 38 | struct count, T > : variadic::count {}; 39 | 40 | } // namespace tinympl 41 | 42 | #endif // TINYMPL_COUNT_HPP 43 | -------------------------------------------------------------------------------- /tinympl/count_if.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_COUNT_IF_HPP 14 | #define TINYMPL_COUNT_IF_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class count_if 25 | * \brief Counts the number of elements which satisfy a given predicate 26 | * \param Sequence The input sequence 27 | * \param F The predicate - `F::type::value` shall be convertible to bool 28 | * \return `count_if<...>::type` is `std::integral_constant` 29 | where `V` is the number of elements in the sequence which satisfy the predicate 30 | `F`. 31 | * \sa variadic::count_if 32 | */ 33 | template class F> 34 | struct count_if : count_if, F > {}; 35 | 36 | template class F, class ... Args> 37 | struct count_if, F > : variadic::count_if {}; 38 | 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_COUNT_IF_HPP 42 | -------------------------------------------------------------------------------- /tinympl/divides.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_DIVIDES_HPP 14 | #define TINYMPL_DIVIDES_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class divides 23 | * \brief Computes `A`/`B` where `A` and `B` are compile time constants 24 | * \return `divides::type` is a `std::integral_constant` where `T` is the common type between `A` and `B`, and `v` is `A::value / B::value` 25 | */ 26 | template struct divides : 27 | std::integral_constant< 28 | typename std::common_type< 29 | typename A::value_type, 30 | typename B::value_type>::type, 31 | A::value / B::value> 32 | {}; 33 | 34 | } // namespace tinympl 35 | 36 | #endif // TINYMPL_DIVIDES_HPP 37 | -------------------------------------------------------------------------------- /tinympl/equal_to.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_EQUAL_TO_HPP 14 | #define TINYMPL_EQUAL_TO_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Comparisons 22 | * \class equal_to 23 | * \brief Determines whether the types `A` and `B` are equal 24 | * \return `equal_to::type` is a `std::integral_constant` where `v` is true iff `A` and `B` are equal 25 | * \note The default behaviour is to forward the call to std::is_same. Users are allowed to specialize this metafunction for user-defined types 26 | */ 27 | template struct equal_to : std::is_same {}; 28 | template struct equal_to< 29 | std::integral_constant, 30 | std::integral_constant > : std::integral_constant {}; 31 | 32 | 33 | } // namespace tinympl 34 | 35 | #endif // TINYMPL_EQUAL_TO_HPP 36 | -------------------------------------------------------------------------------- /tinympl/erase.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_ERASE_HPP 14 | #define TINYMPL_ERASE_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqAlgsIntr 24 | * \class erase 25 | * \brief Remove a range in a given sequence 26 | * \param First The first element to be removed 27 | * \param Last The first element which is not removed 28 | * \param Seq The input sequence 29 | * \param Out The output sequence type 30 | */ 31 | template class Out = as_sequence::template rebind> 35 | struct erase : erase, Out> {}; 36 | 37 | template class Out> 41 | struct erase, Out> : 42 | variadic::erase {}; 43 | 44 | } // namespace tinympl 45 | 46 | #endif // TINYMPL_ERASE_HPP 47 | -------------------------------------------------------------------------------- /tinympl/fill_n.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_FILL_N_HPP 14 | #define TINYMPL_FILL_N_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup SeqModAlgs 22 | * \class fill_n 23 | * \brief Fills an output sequence with N equal elements 24 | * \param N The number of elements 25 | * \param T The type of the elements 26 | * \param Out The output sequence type 27 | * \return `fill_n<...>::type` is a type templated from `Out` constructed with N 28 | types equal to `T` 29 | * \sa variadic::fill_n 30 | */ 31 | template class Out> 32 | struct fill_n : variadic::fill_n {}; 33 | 34 | } // namespace tinympl 35 | 36 | #endif // TINYMPL_FILL_N_HPP 37 | -------------------------------------------------------------------------------- /tinympl/find.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_FIND_HPP 14 | #define TINYMPL_FIND_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class find 25 | * \brief Compute the index of the first element in the sequence which is equal 26 | to the given type T 27 | * \param Sequence The input sequence 28 | * \param T The type to be tested 29 | * \return `find<...>::type` is `std::integral_constant` where 30 | `v` is the 0-based index of the first element which is equal to `T`. If no such 31 | element exists, `v` is `size::value`. 32 | * \note The comparison is done with \ref tinympl::equal_to - it can be 33 | specialized 34 | * \sa variadic::find 35 | */ 36 | template 37 | struct find : find, T > {}; 38 | 39 | template 40 | struct find, T > : variadic::find {}; 41 | 42 | } // namespace tinympl 43 | 44 | #endif // TINYMPL_FIND_HPP 45 | -------------------------------------------------------------------------------- /tinympl/find_if.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_FIND_IF_HPP 14 | #define TINYMPL_FIND_IF_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class find_if Compute the index of a the first element in the sequence which 25 | satisfies a given predicate 26 | * \param Sequence The input sequence 27 | * \param F The test predicate - `F::type::value` shall be convertible to 28 | bool 29 | * \return `find_if<...>::type` is `std::integral_constant` where 30 | `v` is the 0-based index of the first element which satisfy `F`. If no such 31 | element exists, `v` is `size::value`. 32 | * \sa variadic::find_if 33 | */ 34 | template class F> 35 | struct find_if : find_if, F > {}; 36 | 37 | template class F, class ... Args> 38 | struct find_if, F> : variadic::find_if {}; 39 | 40 | } // namespace tinympl 41 | 42 | #endif // TINYMPL_FIND_IF_HPP 43 | -------------------------------------------------------------------------------- /tinympl/generate_n.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_GENERATE_N_HPP 14 | #define TINYMPL_GENERATE_N_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup SeqModAlgs 22 | * \class generate_n 23 | * \brief Generate N elements using a given generator metafunction 24 | * \param N The number of elements to generate 25 | * \param Gen The generator. `Gen< std::integral_constant >::type` must 26 | be a valid expression. 27 | * \param Out the output sequence type 28 | * \return `generate_n<...>::type` is a type templated from `Out` constructed 29 | with N elements generated with `Gen< int_<0> >, Gen< int_<1> >, ... Gen< 30 | int_ >` 31 | * \sa variadic::generate_n 32 | */ 33 | template class Gen, 35 | template class Out> 36 | struct generate_n : variadic::generate_n {}; 37 | 38 | } // namespace tinympl 39 | 40 | #endif // TINYMPL_GENERATE_N_HPP 41 | -------------------------------------------------------------------------------- /tinympl/greater.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_GREATER_HPP 14 | #define TINYMPL_GREATER_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Comparisons 22 | * \class greater 23 | * \brief Determines whether `A` is greater than `B` 24 | * \return `greater::type` is a `std::integral_constant` where `v` is `A::value > B::value` 25 | * \note The default behaviour is to forward the call to \ref less. 26 | */ 27 | template struct greater : less {}; 28 | 29 | } // namespace tinympl 30 | 31 | #endif // TINYMPL_GREATER_HPP 32 | -------------------------------------------------------------------------------- /tinympl/greater_equal.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_GREATER_EQUAL_HPP 14 | #define TINYMPL_GREATER_EQUAL_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \ingroup Comparisons 23 | * \class greater_equal 24 | * \brief Determines whether `A` is greater than or equal to `B` 25 | * \return `greater_equal::type` is a `std::integral_constant` where `v` is `A::value >= B::value` 26 | * \note The default behaviour is to forward the call to \ref less. 27 | */ 28 | template struct greater_equal : negate< typename less::type > {}; 29 | 30 | } // namespace tinympl 31 | 32 | #endif // TINYMPL_GREATER_EQUAL_HPP 33 | -------------------------------------------------------------------------------- /tinympl/identity.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_IDENTITY_HPP 14 | #define TINYMPL_IDENTITY_HPP 15 | 16 | namespace tinympl { 17 | 18 | /** 19 | * \ingroup Functional 20 | * \class identity 21 | * \brief Returns the argument passed 22 | */ 23 | template struct identity {typedef T type;}; 24 | 25 | } // namespace tinympl 26 | 27 | #endif // TINYMPL_IDENTITY_HPP 28 | -------------------------------------------------------------------------------- /tinympl/if.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_IF_HPP 14 | #define TINYMPL_IF_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Functional 22 | * \class if_ 23 | * \brief Returns `A` if `C::value` is true, otherwise `B`. 24 | */ 25 | template struct if_ 26 | { 27 | typedef typename std::conditional::type type; 28 | }; 29 | 30 | } // namespace tinympl 31 | 32 | #endif // TINYMPL_IF_HPP 33 | -------------------------------------------------------------------------------- /tinympl/inherit.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_INHERIT_HPP 14 | #define TINYMPL_INHERIT_HPP 15 | 16 | namespace tinympl { 17 | 18 | /** 19 | * \ingroup Functional 20 | * \class inherit 21 | * \brief Construct a type inherited from the arguments 22 | */ 23 | template struct inherit 24 | { 25 | struct inherit_t : Args... {}; 26 | typedef inherit_t type; 27 | }; 28 | 29 | 30 | } // namespace tinympl 31 | 32 | #endif // TINYMPL_INHERIT_HPP 33 | -------------------------------------------------------------------------------- /tinympl/int.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_INT_HPP 14 | #define TINYMPL_INT_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | //! \ingroup NewTypes 21 | //! Compile time integer 22 | template using int_ = std::integral_constant; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_INT_HPP 27 | -------------------------------------------------------------------------------- /tinympl/is_sequence.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_IS_SEQUENCE_HPP 14 | #define TINYMPL_IS_SEQUENCE_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \ingroup SeqSupport 23 | * \class is_sequence 24 | * \brief Metafunction to determine if a given type is a sequence 25 | */ 26 | template struct is_sequence : std::false_type {}; 27 | template struct is_sequence >::type> : std::true_type {}; 29 | 30 | } 31 | 32 | #endif // TINYMPL_IS_SEQUENCE_HPP 33 | -------------------------------------------------------------------------------- /tinympl/is_unique.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_IS_UNIQUE_HPP 14 | #define TINYMPL_IS_UNIQUE_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqSet 24 | * \class is_unique 25 | * \brief Determines whether the input sequence contains only unique elements 26 | * \param Sequence the input sequence 27 | * \return `is_unique<...>::type` is a `std::integral_constant` where 28 | `v` is true iff the input sequence contains no duplicates 29 | * \note Unlike `std::sort`, the input sequence is not required to be sorted, 30 | but the compile time complexity is O(N^2) 31 | * \note The comparison is done with \ref tinympl::equal_to - it can be 32 | specialized 33 | * \sa variadic::is_unique 34 | */ 35 | template struct is_unique : 36 | is_unique > {}; 37 | 38 | template struct is_unique > : 39 | variadic::is_unique {}; 40 | 41 | } // namespace tinympl 42 | 43 | #endif // TINYMPL_IS_UNIQUE_HPP 44 | -------------------------------------------------------------------------------- /tinympl/left_fold.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LEFT_FOLD_HPP 14 | #define TINYMPL_LEFT_FOLD_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqFold 24 | * \class left_fold 25 | * \brief Collapses a sequence starting from left using a functor. 26 | * \param Sequence The input sequence 27 | * \param F The functor; `F` must be a valid expression 28 | * \return A type which is the result of `F( ... F(F(A1,A2),A3) .. )` 29 | * \sa variadic::left_fold 30 | */ 31 | template class F> 32 | struct left_fold : left_fold< as_sequence_t, F> {}; 33 | 34 | template class F> 35 | struct left_fold, F> : variadic::left_fold {}; 36 | 37 | } // namespace tinympl 38 | 39 | #endif // TINYMPL_LEFT_FOLD_HPP 40 | -------------------------------------------------------------------------------- /tinympl/less.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LESS_HPP 14 | #define TINYMPL_LESS_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Comparisons 22 | * \class less 23 | * \brief Determines whether `A` is less than `B` 24 | * \return `less::type` is a `std::integral_constant` where `v` is `A::value < B::value` 25 | * \note Users are allowed to specialize this metafunction for user-defined types 26 | * 27 | */ 28 | template struct less : std::integral_constant {}; 29 | 30 | } // namespace tinympl 31 | 32 | #endif // TINYMPL_LESS_HPP 33 | -------------------------------------------------------------------------------- /tinympl/less_equal.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LESS_EQUAL_HPP 14 | #define TINYMPL_LESS_EQUAL_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \class less_equal 23 | * \brief Determines whether `A` is less than or equal to `B` 24 | * \return `less_equal::type` is a `std::integral_constant` where `v` is `A::value <= B::value` 25 | * \note The default behaviour is to forward the call to \ref less. 26 | */ 27 | template struct less_equal : negate< typename less::type > {}; 28 | 29 | } // namespace tinympl 30 | 31 | #endif // TINYMPL_LESS_EQUAL_HPP 32 | -------------------------------------------------------------------------------- /tinympl/logical_and.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LOGICAL_AND_HPP 14 | #define TINYMPL_LOGICAL_AND_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Logical 22 | * \class logical_and 23 | * \brief Computes the logical and of all its arguments 24 | */ 25 | template struct logical_and : and_b {}; 26 | template using and_ = logical_and; 27 | 28 | } // namespace tinympl 29 | 30 | #endif // TINYMPL_LOGICAL_AND_HPP 31 | -------------------------------------------------------------------------------- /tinympl/logical_not.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LOGICAL_NOT_HPP 14 | #define TINYMPL_LOGICAL_NOT_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Logical 22 | * \class logical_not 23 | * \brief Negate the argument 24 | */ 25 | template struct logical_not : not_b {}; 26 | template using not_ = logical_not; 27 | 28 | } // namespace tinympl 29 | 30 | #endif // TINYMPL_LOGICAL_NOT_HPP 31 | -------------------------------------------------------------------------------- /tinympl/logical_or.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LOGICAL_OR_HPP 14 | #define TINYMPL_LOGICAL_OR_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Logical 22 | * \class logical_or 23 | * \brief Computes the logical or of all its arguments 24 | */ 25 | template struct logical_or : or_b {}; 26 | template using or_ = logical_or; 27 | 28 | } // namespace tinympl 29 | 30 | #endif // TINYMPL_LOGICAL_OR_HPP 31 | -------------------------------------------------------------------------------- /tinympl/long.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_LONG_HPP 14 | #define TINYMPL_LONG_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | //! \ingroup NewTypes 21 | //! Compile time long 22 | template using long_ = std::integral_constant; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_LONG_HPP 27 | -------------------------------------------------------------------------------- /tinympl/minus.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_MINUS_HPP 14 | #define TINYMPL_MINUS_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class minus 23 | * \brief Computes `A`-`B` where `A` and `B` are compile time type constants 24 | * \return `minus::type` is a `std::integral_constant` where `T` is the common type between `A` and `B`, and `v` is `A::value - B::value` 25 | */ 26 | template struct minus : 27 | std::integral_constant< 28 | typename std::common_type< 29 | typename A::value_type, 30 | typename B::value_type>::type, 31 | A::value - B::value> 32 | {}; 33 | 34 | 35 | } // namespace tinympl 36 | 37 | #endif // TINYMPL_MINUS_HPP 38 | -------------------------------------------------------------------------------- /tinympl/modulus.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_MODULUS_HPP 14 | #define TINYMPL_MODULUS_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class modulus 23 | * \brief Computes `A`%`B` where `A` and `B` are compile time constants 24 | * \return `modulus::type` is a `std::integral_constant` where `T` is the common type between `A` and `B`, and `v` is `A::value % B::value` 25 | */ 26 | template struct modulus : 27 | std::integral_constant< 28 | typename std::common_type< 29 | typename A::value_type, 30 | typename B::value_type>::type, 31 | A::value % B::value> 32 | {}; 33 | 34 | } // namespace tinympl 35 | 36 | #endif // TINYMPL_MODULUS_HPP 37 | -------------------------------------------------------------------------------- /tinympl/multiplies.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_MULTIPLIES_HPP 14 | #define TINYMPL_MULTIPLIES_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class multiplies 23 | * \brief Multiplies its arguments 24 | * \return `multiplies::type` is a `std::integral_constant` where `T` is the common type between the `Args::type...` and `v` is the product of `Args::value ...` 25 | */ 26 | template struct multiplies; 27 | 28 | template struct multiplies : multiplies::type> {}; 29 | 30 | template struct multiplies : 31 | std::integral_constant< 32 | typename std::common_type< 33 | typename A::value_type, 34 | typename B::value_type 35 | >::type, A::value * B::value> 36 | {}; 37 | 38 | } // namespace tinympl 39 | 40 | #endif // TINYMPL_MULTIPLIES_HPP 41 | -------------------------------------------------------------------------------- /tinympl/negate.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_NEGATE_HPP 14 | #define TINYMPL_NEGATE_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class negate 23 | * \brief Returns the opposite of the compile time constant A 24 | * \return `negate::type` is `std::integral_constant` 25 | */ 26 | template struct negate : std::integral_constant {}; 27 | 28 | } // namespace tinympl 29 | 30 | #endif // TINYMPL_NEGATE_HPP 31 | -------------------------------------------------------------------------------- /tinympl/none_of.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_NONE_OF_HPP 14 | #define TINYMPL_NONE_OF_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqNonModAlgs 24 | * \class none_of 25 | * \brief Determines whether none of the elements in the sequence satisfy the 26 | given predicate 27 | * \param Sequence the input sequence 28 | * \param F the predicate, `F::type::value` must be convertible to bool 29 | * \return `none_of<...>::type` is a `std::integral_constant` where `v` 30 | is true iff none of the elements in the sequence satisfy the predicate `F` 31 | * \sa variadic::none_of 32 | */ 33 | template< class Sequence, template class F> 34 | struct none_of : none_of, F> {}; 35 | 36 | template< template class F, class ... Args> 37 | struct none_of, F > : variadic::none_of {}; 38 | 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_NONE_OF_HPP 42 | -------------------------------------------------------------------------------- /tinympl/not_b.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_NOT_B_HPP 14 | #define TINYMPL_NOT_B_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | template struct not_b : std::integral_constant {}; 21 | 22 | } // namespace tinympl 23 | 24 | #endif // TINYMPL_NOT_B_HPP 25 | -------------------------------------------------------------------------------- /tinympl/not_equal_to.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_NOT_EQUAL_TO_HPP 14 | #define TINYMPL_NOT_EQUAL_TO_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \class not_equal_to 23 | * \brief Determines whether the types `A` and `B` are not equal 24 | * \return `not_equal_to::type` is a `std::integral_constant` where `v` is `!equal_to::value` 25 | */ 26 | template struct not_equal_to : std::integral_constant::value > {}; 27 | 28 | } // namespace tinympl 29 | 30 | #endif // TINYMPL_NOT_EQUAL_TO_HPP 31 | -------------------------------------------------------------------------------- /tinympl/or_b.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_OR_B_HPP 14 | #define TINYMPL_OR_B_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | template struct or_b; 21 | template struct or_b : std::integral_constant::value> {}; 22 | template struct or_b : std::integral_constant {}; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_OR_B_HPP 27 | -------------------------------------------------------------------------------- /tinympl/plus.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_PLUS_HPP 14 | #define TINYMPL_PLUS_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Arithmetic 22 | * \class plus 23 | * \brief Sums its arguments 24 | * \return `plus::type` is a `std::integral_constant` where `T` is the common type between the `Args::type...` and `v` is the sum of `Args::value ... ` 25 | */ 26 | template struct plus; 27 | template struct plus : plus::type> {}; 28 | 29 | template struct plus : 30 | std::integral_constant< 31 | typename std::common_type< 32 | typename A::value_type, 33 | typename B::value_type 34 | >::type, A::value + B::value> 35 | {}; 36 | 37 | template struct plus : std::integral_constant {}; 38 | 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_PLUS_HPP 42 | -------------------------------------------------------------------------------- /tinympl/reverse.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_REVERSE_HPP 14 | #define TINYMPL_REVERSE_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqModAlgs 24 | * \class reverse 25 | * \brief Reverse the input sequence 26 | * \param Sequence the input sequence 27 | * \param Out the output sequence type, defaults to the same kind of the input 28 | sequence type 29 | * \return `reverse<...>::type` is a type templated from `Out` which contains 30 | the reversed sequence 31 | * \sa variadic::reverse 32 | */ 33 | template class Out = as_sequence::template rebind> 35 | struct reverse : reverse< as_sequence_t, Out> {}; 36 | 37 | template class Out, class ... Args> 38 | struct reverse, Out> : variadic::reverse {}; 39 | 40 | } // namespace tinympl 41 | 42 | #endif // TINYMPL_REVERSE_HPP 43 | -------------------------------------------------------------------------------- /tinympl/right_fold.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_RIGHT_FOLD_HPP 14 | #define TINYMPL_RIGHT_FOLD_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | 22 | /** 23 | * \ingroup SeqFold 24 | * \class right_fold 25 | * \brief Collapses a sequence starting from right using a functor. 26 | * \param Sequence The input sequence 27 | * \param F The functor; `F` must be a valid expression 28 | * \return A type which is the result of `F(A1, F(A2,F(A3, ... ) ) )` 29 | * \sa variadic::right_fold 30 | */ 31 | template class F> 32 | struct right_fold : right_fold< as_sequence_t, F> {}; 33 | 34 | template class F> 35 | struct right_fold, F> : variadic::right_fold {}; 36 | 37 | } // namespace tinympl 38 | 39 | #endif // TINYMPL_RIGHT_FOLD_HPP 40 | -------------------------------------------------------------------------------- /tinympl/sequence.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_SEQUENCE_HPP 14 | #define TINYMPL_SEQUENCE_HPP 15 | 16 | namespace tinympl { 17 | 18 | /** 19 | * \defgroup SeqSupport Sequence support 20 | * Basic sequences support - provides user defined customization points to define sequences. 21 | * @{ 22 | */ 23 | 24 | /** 25 | * \class sequence 26 | * \brief The main sequence type. 27 | */ 28 | template struct sequence; 29 | 30 | /** @} */ 31 | } 32 | 33 | #endif // TINYMPL_SEQUENCE_HPP 34 | -------------------------------------------------------------------------------- /tinympl/short.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_SHORT_HPP 14 | #define TINYMPL_SHORT_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | //! \ingroup NewTypes 21 | //! Compile time short 22 | template using short_ = std::integral_constant; 23 | 24 | } // namespace tinympl 25 | 26 | #endif // TINYMPL_SHORT_HPP 27 | -------------------------------------------------------------------------------- /tinympl/size.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_SIZE_HPP 14 | #define TINYMPL_SIZE_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \ingroup SeqAlgsIntr 23 | * \class size 24 | * \brief Get the number of elements of a sequence 25 | * \param Seq the sequence 26 | */ 27 | template struct size : size< as_sequence_t > {}; 28 | template 29 | struct size > : variadic::size {}; 30 | 31 | } // namespace tinympl 32 | 33 | #endif // TINYMPL_SIZE_HPP 34 | -------------------------------------------------------------------------------- /tinympl/sizeof.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_SIZEOF_HPP 14 | #define TINYMPL_SIZEOF_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup Functional 22 | * \class sizeof_ 23 | * \brief Returns an `std::integral_constant` where `V` is the compile time size of the input type 24 | */ 25 | template struct sizeof_ : std::integral_constant {}; 26 | 27 | } // namespace tinympl 28 | 29 | #endif // TINYMPL_SIZEOF_HPP 30 | -------------------------------------------------------------------------------- /tinympl/string_macro.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_STRING_MACRO_HPP 14 | #define TINYMPL_STRING_MACRO_HPP 15 | 16 | #include 17 | 18 | /** 19 | * \file string_macro.hpp Definition of macros to simplify the creation of a tinympl::string 20 | */ 21 | 22 | #define TINYMPL_STRING_JOIN2(arg1,arg2) TINYMPL_DO_STRING_JOIN2(arg1,arg2) 23 | #define TINYMPL_DO_STRING_JOIN2(arg1,arg2) arg1 ## arg2 24 | 25 | /** 26 | * \ingroup String 27 | */ 28 | 29 | /** 30 | * \def MAKE_TINYMPL_STRING(name,str) 31 | * Define a typedef called `name` to a `tinympl::basic_string` which contains the string `str` 32 | */ 33 | #define MAKE_TINYMPL_STRING(name,str) \ 34 | constexpr const char TINYMPL_STRING_JOIN2(tinympl_string_temporary_, name) [] = str; \ 35 | typedef tinympl::string name 36 | 37 | #endif // TINYMPL_STRING_MACRO_HPP 38 | -------------------------------------------------------------------------------- /tinympl/transform2.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_TRANSFORM2_HPP 14 | #define TINYMPL_TRANSFORM2_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | 21 | /** 22 | * \ingroup SeqModAlgs 23 | * \class transform2 24 | * \brief Transform two input sequences using a function 25 | * \param Sequence1 the first input sequence 26 | * \param Sequence2 the second input sequence 27 | * \param F The transform function. `F::type` must be a valid expression 28 | * \param Out The output sequence type, defaults to the same kind of the input 29 | sequence 30 | * \return `transform2<...>::type` is a type templated from `Out` which contains 31 | the transformed types 32 | */ 33 | template < class Sequence1, 34 | class Sequence2, 35 | template class F, 36 | template class Out = 37 | as_sequence::template rebind > 38 | struct transform2 : transform_many {}; 39 | 40 | } // namespace tinympl 41 | 42 | #endif // TINYMPL_TRANSFORM2_HPP 43 | -------------------------------------------------------------------------------- /tinympl/variadic.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_HPP 14 | #define TINYMPL_VARIADIC_HPP 15 | 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | // For backward compatibility 23 | #include 24 | 25 | namespace tinympl { namespace variadic { 26 | 27 | /** 28 | * \defgroup VariadicBasic Basic variadic support 29 | * Basic support for variadic template sequences 30 | */ 31 | 32 | } } 33 | 34 | #endif // TINYMPL_VARIADIC_HPP 35 | -------------------------------------------------------------------------------- /tinympl/variadic/accumulate.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_ACCUMULATE_HPP 14 | #define TINYMPL_VARIADIC_ACCUMULATE_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | namespace variadic { 20 | 21 | /** 22 | * \ingroup VarFold 23 | * \brief Alias for left_fold. 24 | * \see left_fold 25 | * \sa tinympl::accumulate 26 | */ 27 | template class Op, class ... Args> 28 | using accumulate = left_fold; 29 | 30 | } // namespace variadic 31 | } // namespace tinympl 32 | 33 | #endif // TINYMPL_VARIADIC_ACCUMULATE_HPP 34 | -------------------------------------------------------------------------------- /tinympl/variadic/at.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_AT_HPP 14 | #define TINYMPL_VARIADIC_AT_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | namespace variadic { 20 | 21 | /** 22 | * \ingroup VarBasics 23 | * \class at 24 | * \brief Extract the i-th element of a variadic template 25 | * \param i The index to extract 26 | */ 27 | template struct at; 28 | 29 | template using at_t = typename at::type; 30 | 31 | template struct at 32 | { 33 | static_assert(i < sizeof ... (Tail) + 1,"Index out of range"); 34 | typedef typename at::type type; 35 | }; 36 | 37 | template struct at<0,Head,Tail...> 38 | { 39 | typedef Head type; 40 | }; 41 | 42 | } // namespace variadic 43 | } // namespace tinympl 44 | 45 | #endif // TINYMPL_VARIADIC_AT_HPP 46 | -------------------------------------------------------------------------------- /tinympl/variadic/copy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_COPY_HPP 14 | #define TINYMPL_VARIADIC_COPY_HPP 15 | 16 | namespace tinympl { 17 | namespace variadic { 18 | 19 | /** 20 | * \ingroup VarModAlgs 21 | * \class copy 22 | * \brief Copy the elements from the input sequence to the output sequence 23 | * \param Out The output sequence type - defaults to the same sequence kind of 24 | the input sequence 25 | * \param Args... The input sequence 26 | * \return `copy<...>::type` is a type templated from `Out` which is constructed 27 | with the elements of SequenceIn. 28 | * \sa tinympl::copy 29 | */ 30 | template class Out, class ... Args> 31 | struct copy { 32 | typedef Out type; 33 | }; 34 | 35 | } // namespace variadic 36 | } // namespace tinympl 37 | 38 | #endif // TINYMPL_VARIADIC_COPY_HPP 39 | -------------------------------------------------------------------------------- /tinympl/variadic/count.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_COUNT_HPP 14 | #define TINYMPL_VARIADIC_COUNT_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | namespace variadic { 22 | 23 | /** 24 | * \ingroup VarNonModAlgs 25 | * \class count 26 | * \brief Counts the number of elements in a sequence equal to a given one 27 | * \param T the type to be tested. 28 | * \param Args... the input sequence 29 | * \return `count<...>::type` is `std::integral_constant` where 30 | `V` is the number of elements in the sequence equal to `T` 31 | * \note The comparison is done with \ref tinympl::equal_to - it can be 32 | specialized. 33 | * \sa tinympl::count 34 | */ 35 | template 36 | struct count : count_if< bind::template eval_t, Args ... > 37 | {}; 38 | 39 | 40 | } // namespace variadic 41 | } // namespace tinympl 42 | 43 | #endif // TINYMPL_VARIADIC_COUNT_HPP 44 | -------------------------------------------------------------------------------- /tinympl/variadic/find.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_FIND_HPP 14 | #define TINYMPL_VARIADIC_FIND_HPP 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | namespace tinympl { 21 | namespace variadic { 22 | 23 | /** 24 | * \ingroup VarNonModAlgs 25 | * \class find 26 | * \brief Compute the index of the first element in the sequence which is equal 27 | to the given type T 28 | * \param T The type to be tested 29 | * \param Args... the input sequence 30 | * \return `find<...>::type` is `std::integral_constant` where 31 | `v` is the 0-based index of the first element which is equal to `T`. If no such 32 | element exists, `v` is `size::value`. 33 | * \note The comparison is done with \ref tinympl::equal_to - it can be 34 | specialized 35 | * \sa tinympl::find 36 | */ 37 | template 38 | struct find : find_if< bind::template eval_t, Args ... > {}; 39 | 40 | } // namespace variadic 41 | } // namespace tinympl 42 | 43 | #endif // TINYMPL_VARIADIC_FIND_HPP 44 | -------------------------------------------------------------------------------- /tinympl/variadic/left_fold.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_LEFT_FOLD_HPP 14 | #define TINYMPL_VARIADIC_LEFT_FOLD_HPP 15 | 16 | namespace tinympl { 17 | namespace variadic { 18 | 19 | /** 20 | * \ingroup VarFold 21 | * \class left_fold 22 | * \brief Collapses a sequence starting from left using a functor. 23 | * \param F The functor; `F` must be a valid expression 24 | * \param Args... The input sequence 25 | * \return A type which is the result of `F( ... F(F(A1,A2),A3) .. )` 26 | * \sa tinympl::left_fold 27 | */ 28 | template class Op, class ... Args> struct left_fold; 29 | 30 | template class Op, class Head, class Next, class ... Tail> 31 | struct left_fold { 32 | typedef typename left_fold < 33 | Op, 34 | typename Op::type, 35 | Tail... >::type type; 36 | }; 37 | 38 | template class Op, typename T> 39 | struct left_fold { 40 | typedef T type; 41 | }; 42 | 43 | } // namespace variadic 44 | } // namespace tinympl 45 | 46 | #endif // TINYMPL_VARIADIC_LEFT_FOLD_HPP 47 | -------------------------------------------------------------------------------- /tinympl/variadic/max_element.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_MAX_ELEMENT_HPP 14 | #define TINYMPL_VARIADIC_MAX_ELEMENT_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | namespace variadic { 21 | 22 | /** 23 | * \ingroup VarMaxMin 24 | * \class max_element 25 | * \brief Compute the index of the largest element in a sequence 26 | * \param Cmp the comparator function; `Cmp::type::value` must be 27 | convertible to bool. Defaults to \ref tinympl::less 28 | * \param Args... the input sequence 29 | * \return `max_element<...>::type` is an 30 | `std::integral_constant` where `v` is the 0-based index of the 31 | maximum element 32 | * \sa tinympl::max_element 33 | */ 34 | template class Cmp, class ... Args> 35 | struct max_element : 36 | min_element< bind::template eval_t, Args... > {}; 37 | 38 | } // namespace variadic 39 | } // namespace tinympl 40 | 41 | #endif // TINYMPL_VARIADIC_MAX_ELEMENT_HPP 42 | -------------------------------------------------------------------------------- /tinympl/variadic/right_fold.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_RIGHT_FOLD_HPP 14 | #define TINYMPL_VARIADIC_RIGHT_FOLD_HPP 15 | 16 | namespace tinympl { 17 | namespace variadic { 18 | 19 | /** 20 | * \ingroup VarFold 21 | * \class right_fold 22 | * \brief Collapses a sequence starting from right using a functor. 23 | * \param F The functor; `F` must be a valid expression 24 | * \param Args... The input sequence 25 | * \return A type which is the result of `F(A1, F(A2,F(A3, ... ) ) )` 26 | * \sa tinympl::right_fold 27 | */ 28 | template class Op, class ... Args> struct right_fold; 29 | 30 | template class Op, class Head, class ... Tail> 31 | struct right_fold { 32 | typedef typename Op < Head, 33 | typename right_fold::type >::type type; 34 | }; 35 | 36 | template class Op, typename T> struct right_fold { 37 | typedef T type; 38 | }; 39 | 40 | } // namespace variadic 41 | } // namespace tinympl 42 | 43 | #endif // TINYMPL_VARIADIC_RIGHT_FOLD_HPP 44 | -------------------------------------------------------------------------------- /tinympl/variadic/size.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_SIZE_HPP 14 | #define TINYMPL_VARIADIC_SIZE_HPP 15 | 16 | #include 17 | #include 18 | 19 | namespace tinympl { 20 | namespace variadic { 21 | 22 | /** 23 | * \ingroup VariadicBasic 24 | * \class size 25 | * \brief Compute the size of a variadic template 26 | * \return `size::value` is equivalent to `sizeof ... (Args)` 27 | */ 28 | template struct size; 29 | 30 | template using size_t = typename size::type; 31 | 32 | template struct size : std::integral_constant {}; 33 | 34 | } // namespace variadic 35 | } // namespace tinympl 36 | 37 | #endif // TINYMPL_VARIADIC_SIZE_HPP 38 | -------------------------------------------------------------------------------- /tinympl/variadic/transform.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_VARIADIC_TRANSFORM_HPP 14 | #define TINYMPL_VARIADIC_TRANSFORM_HPP 15 | 16 | namespace tinympl { 17 | namespace variadic { 18 | 19 | /** 20 | * \ingroup VarModAlgs 21 | * \class transform 22 | * \brief Transform an input sequence using a transform function 23 | * \param F The transform function. `F::type` must be a valid expression 24 | * \param Out The output sequence type, defaults to the same kind of the input 25 | sequence 26 | * \param Args... the input sequence 27 | * \return `transform<...>::type` is a type templated from `Out` which contains 28 | the transformed types 29 | * \sa tinympl::transform 30 | */ 31 | template class F, 32 | template class Out, 33 | class ... Args> struct transform; 34 | 35 | template< template class F, 36 | template class Out, 37 | class ... Args> 38 | struct transform { 39 | typedef Out< typename F::type ... > type; 40 | }; 41 | 42 | } // namespace variadic 43 | } // namespace tinympl 44 | 45 | #endif // TINYMPL_VARIADIC_TRANSFORM_HPP 46 | -------------------------------------------------------------------------------- /tinympl/zip.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013, Ennio Barbaro. 2 | // 3 | // Use, modification, and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://sbabbi.github.io/tinympl for documentation. 8 | // 9 | // You are welcome to contact the author at: 10 | // enniobarbaro@gmail.com 11 | // 12 | 13 | #ifndef TINYMPL_ZIP_HPP 14 | #define TINYMPL_ZIP_HPP 15 | 16 | #include 17 | 18 | namespace tinympl { 19 | 20 | /** 21 | * \ingroup SeqModAlgs 22 | * \class zip 23 | * \brief Construct a single sequence by zipping together multiple sequences 24 | * \param OutSequence The type of the output sequence 25 | * \param ZipType The type of the inner sequence 26 | * \param Sequences... The input sequences 27 | */ 28 | template class OutSequence, 29 | template class ZipType, 30 | class ... Sequences> 31 | struct zip : transpose< sequence, OutSequence, ZipType> {}; 32 | 33 | } // namespace tinympl 34 | 35 | #endif // TINYMPL_ZIP_HPP 36 | --------------------------------------------------------------------------------