Proton  1.1.1
Make porting easy from Python to C++11
base.hpp File Reference

the basic header for Proton Library More...

#include <iostream>
#include <ctime>
#include <cstring>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <type_traits>

Go to the source code of this file.


class  proton::err
 The exception class. More...


namespace  proton
 The main proton namespace.
namespace  proton::detail
 The implementation namespace of proton.


#define PROTON_DEBUG_OPT   1
 Control debug macros.
#define PROTON_LOG(lvl, out)
 Log messages to cerr.
#define PROTON_THROW_IF(cond, out)
 Proton's inverse assert.
#define PROTON_ERR(out)
 Throw an err.


template<typename T >
const detail::min_t< T >::item_t & proton::min (const T &v)
 smallest item.
template<typename T >
const detail::max_t< T >::item_t & proton::max (const T &v)
 largest item.
template<typename T , typename V >
bool proton::has (const T &x, V &&v)
 check if x has val.
template<typename T >
size_t proton::len (const T &v)
 get length.


int proton::debug_level
 The level controls output of PROTON_LOG().
bool proton::log_console
 true: PROTON_LOG/PROTON_THROW_IF/PROTON_ERR will output to console, false: no console output for these macros.
int proton::wait_on_err
 0: nonstop, 1: stop on PROTON_ERR, 2: stop on PROTON_THROW_IF assert

Detailed Description

the basic header for Proton Library

Definition in file base.hpp.