Compare commits

..

1 Commits

8 changed files with 0 additions and 349 deletions

View File

@ -1,23 +0,0 @@
#----------------------------------------------------------------------------
# This file was automatically generated from the original CMakeLists.txt file
# Add a variable to hold the headers for the library
set (lib_headers
fusion
)
# Add a library target to the build system
boost_library_project(
fusion
# SRCDIRS
# TESTDIRS
HEADERS ${lib_headers}
# DOCDIRS
DESCRIPTION "Library for working with tuples, including various containers, algorithms, etc."
MODULARIZED
AUTHORS "Joel de Guzman <joel -at- boost-consulting.com>"
"Dan Marsden <danmarsden -at- yahoo.co.uk>"
"Tobias Schwinger <tschwinger -at- isonews2.com>"
# MAINTAINERS
)

View File

@ -1,29 +0,0 @@
#=============================================================================
# Copyright (c) 2008 Dan Marsden
#
# Use modification and distribution are subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt).
#==============================================================================
CXX=g++
CXXFLAGS=-I$(BOOST_ROOT)
TEST_SRCS=\
vector_construction.cpp\
vector_iteration.cpp\
vector_intrinsic.cpp\
fold.cpp\
transform.cpp
TEST_OBJS=$(TEST_SRCS:.cpp=.o)
TEST_TARGETS=$(TEST_SRCS:.cpp=.test)
all: $(TEST_TARGETS)
%.test : %.cpp
time $(CXX) $(CXXFLAGS) $< -o $@
clean:
rm -f $(TEST_TARGETS) $(TEST_OBJS)

View File

@ -1,75 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_COMPILE_TIME_DRIVER)
#define BOOST_FUSION_COMPILE_TIME_DRIVER
int main()
{
test<0>();
test<1>();
test<2>();
test<3>();
test<4>();
test<5>();
test<6>();
test<7>();
test<8>();
test<9>();
test<10>();
test<11>();
test<12>();
test<13>();
test<14>();
test<15>();
test<16>();
test<17>();
test<18>();
test<19>();
test<20>();
test<21>();
test<22>();
test<23>();
test<24>();
test<25>();
test<26>();
test<27>();
test<28>();
test<29>();
test<30>();
test<31>();
test<32>();
test<33>();
test<34>();
test<35>();
test<36>();
test<37>();
test<38>();
test<39>();
test<40>();
test<41>();
test<42>();
test<43>();
test<44>();
test<45>();
test<46>();
test<47>();
test<48>();
test<49>();
}
#endif

View File

@ -1,42 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#include <boost/fusion/include/fold.hpp>
#include <boost/fusion/include/vector.hpp>
namespace fusion = boost::fusion;
namespace
{
template<int n, int batch>
struct distinct
{};
struct f
{
typedef int result_type;
template<int n, int batch>
int operator()(distinct<n, batch> const& d, int state) const
{
return state + n;
}
};
template<int batch>
void test()
{
fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v;
fusion::fold(v, 0, f());
}
}
#include "./driver.hpp"

View File

@ -1,55 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#include <boost/fusion/include/transform.hpp>
#include <boost/fusion/include/for_each.hpp>
#include <boost/fusion/include/vector.hpp>
namespace fusion = boost::fusion;
namespace
{
template<int n, int batch>
struct distinct
{
static const int value = n;
};
struct f
{
typedef int result_type;
template<typename T>
result_type operator()(T const& t) const
{
return T::value;
}
};
struct touch
{
template<typename T>
void operator()(T const&) const
{}
};
template<int batch>
void test()
{
fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v;
// We're testing transform really
// for_each call is to force iteration through the lazy
// transform, otherwise very little will happen.
fusion::for_each(fusion::transform(v, f()), touch());
}
}
#include "./driver.hpp"

View File

@ -1,28 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#include <boost/fusion/include/vector.hpp>
namespace fusion = boost::fusion;
namespace
{
template<int n, int batch>
struct distinct
{};
template<int batch>
void test()
{
fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v;
}
}
#include "./driver.hpp"

View File

@ -1,59 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/intrinsic.hpp>
namespace fusion = boost::fusion;
namespace
{
template<int n, int batch>
struct distinct
{};
template<int batch>
void test()
{
typedef fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v_type;
v_type v;
fusion::at_c<0>(v);
fusion::at_c<1>(v);
fusion::at_c<2>(v);
fusion::at_c<3>(v);
fusion::at_c<4>(v);
fusion::at_c<5>(v);
fusion::at_c<6>(v);
fusion::at_c<7>(v);
fusion::at_c<8>(v);
fusion::at_c<9>(v);
typedef typename fusion::result_of::value_at_c<v_type, 0>::type va0;
typedef typename fusion::result_of::value_at_c<v_type, 1>::type va1;
typedef typename fusion::result_of::value_at_c<v_type, 2>::type va2;
typedef typename fusion::result_of::value_at_c<v_type, 3>::type va3;
typedef typename fusion::result_of::value_at_c<v_type, 4>::type va4;
typedef typename fusion::result_of::value_at_c<v_type, 5>::type va5;
typedef typename fusion::result_of::value_at_c<v_type, 6>::type va6;
typedef typename fusion::result_of::value_at_c<v_type, 7>::type va7;
typedef typename fusion::result_of::value_at_c<v_type, 8>::type va8;
typedef typename fusion::result_of::value_at_c<v_type, 9>::type va9;
fusion::begin(v);
fusion::end(v);
fusion::size(v);
}
}
#include "./driver.hpp"

View File

@ -1,38 +0,0 @@
/*=============================================================================
Copyright (c) 2008 Dan Marsden
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/for_each.hpp>
namespace fusion = boost::fusion;
namespace
{
template<int n, int batch>
struct distinct
{};
struct null_op
{
template<typename T>
void operator()(T const& t) const
{}
};
template<int batch>
void test()
{
fusion::vector<
distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>,
distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v;
fusion::for_each(v, null_op());
}
}
#include "./driver.hpp"