#include <paludis/paludis.hh>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cstdlib>
#include <set>
#include <map>
using namespace examples;
using std::cout;
using std::endl;
using std::setw;
using std::left;
int main(int argc, char * argv[])
{
try
{
"example_dep_spec_flattener", "EXAMPLE_DEP_SPEC_FLATTENER_OPTIONS", "EXAMPLE_DEP_SPEC_FLATTENER_CMDLINE");
for (const auto & id : *ids)
{
cout << "Information about '" << *id << "':" << endl;
if (id->homepage_key())
{
id->homepage_key()->parse_value()->top()->accept(homepages);
cout << " " << left << setw(24) << "Homepages:" << " "
<< endl;
}
if (id->end_metadata() != id->find_metadata("RESTRICT") &&
{
visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(
**id->find_metadata("RESTRICT"))->parse_value()->top()->accept(restricts);
cout << " " << left << setw(24) << "Restricts:" << " "
<< endl;
}
cout << endl;
}
}
{
cout << endl;
cout << "Unhandled exception:" << endl
return EXIT_FAILURE;
}
catch (const std::exception & e)
{
cout << endl;
cout << "Unhandled exception:" << endl
<<
" * " << e.
what() << endl;
return EXIT_FAILURE;
}
catch (...)
{
cout << endl;
cout << "Unhandled exception:" << endl
<< " * Unknown exception type. Ouch..." << endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
Definition dep_spec_flattener.hh:65
Definition exception.hh:77
std::string backtrace(const std::string &delim) const
const char * what() const noexcept override
const std::string & message() const noexcept
static CommandLine * get_instance() PALUDIS_ATTRIBUTE((warn_unused_result))
Definition generator.hh:147
Definition selection.hh:172
IndirectIterator< Iter_ > indirect_iterator(const Iter_ &)
T_ join(I_ i, I_ end, const T_ &joiner)
Definition join.hh:45
Definition about_metadata-fwd.hh:24