#include <iostream>
#include <limits>
struct my_type
{
typedef unsigned key_type;
key_type _key;
char _data[128 - sizeof(key_type)];
key_type key() const
{
return _key;
}
my_type() { }
my_type(key_type __key) : _key(__key) { }
static my_type min_value()
{
}
static my_type max_value()
{
}
};
inline bool operator < (
const my_type& a,
const my_type& b)
{
return a.key() < b.key();
}
inline bool operator == (
const my_type& a,
const my_type& b)
{
return a.key() == b.key();
}
struct Cmp
{
typedef my_type first_argument_type;
typedef my_type second_argument_type;
typedef bool result_type;
bool operator () (const my_type& a, const my_type& b) const
{
return a < b;
}
static my_type min_value()
{
return my_type::min_value();
}
static my_type max_value()
{
return my_type::max_value();
}
};
std::ostream&
operator << (std::ostream& o,
const my_type& obj)
{
o << obj._key;
return o;
}
int main(int argc, char** argv)
{
if (argc < 3)
{
std::cout << "Usage: " << argv[0] << " infile outfile" << std::endl;
return -1;
}
const unsigned memory_to_use = 512 * 1024 * 1024;
const unsigned int block_size = sizeof(my_type) * 4096;
vector_type input(&in_file);
vector_type output(&out_file);
output.resize(input.size());
#if STXXL_MSVC
#else
#endif
typedef Cmp comparator_type;
sort_stream_type sort_stream(input_stream, comparator_type(), memory_to_use);
if (1) {
}
return 0;
}