Boost-Graph
view release on metacpan or search on metacpan
include/boost/date_time/date_duration.hpp view on Meta::CPAN
bool is_negative() const
{
return days_ < 0;
}
private:
duration_rep days_;
};
/*! Struct for instantiating date_duration with <b>NO</b> special values
* functionality. Allows for transparent implementation of either
* date_duration<long> or date_duration<int_adapter<long> > */
struct duration_traits_long
{
typedef long int_type;
typedef long impl_type;
static int_type as_number(impl_type i) { return i; };
};
/*! Struct for instantiating date_duration <b>WITH</b> special values
* functionality. Allows for transparent implementation of either
* date_duration<long> or date_duration<int_adapter<long> > */
struct duration_traits_adapted
{
typedef long int_type;
typedef boost::date_time::int_adapter<long> impl_type;
static int_type as_number(impl_type i) { return i.as_number(); };
};
} } //namspace date_time
include/boost/format/detail/compat_workarounds.hpp view on Meta::CPAN
// and compiler-specific switches)
// Non-conformant Std-libs fail to supply conformant traits (std::char_traits,
// std::allocator) and/or the std::string doesnt support them.
// We don't want to have hundreds of #ifdef workarounds, so we define
// replacement traits.
// But both char_traits and allocator traits are visible in the interface,
// (inside the final string type), thus we need to keep both
// the replacement type (typedefed to 'compatible_type') for real use,
// and the original stdlib type (typedef to 'type_for_string') for interface
// visibility. This is what Compat* classes do (as well as be transparent
// when good allocator and char traits are present)
#ifndef BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP
#define BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP
namespace boost {
namespace io {
// gcc-2.95 char traits (non-conformantly named string_char_traits)
// lack several functions so we extend them in a replacement class.
include/boost/format/detail/compat_workarounds.hpp view on Meta::CPAN
#endif
namespace boost {
namespace io {
// **** CompatTraits general definitions : ----------------------------
template<class Tr>
class CompatTraits
{ // general case : be transparent
public:
typedef Tr compatible_type;
};
// **** CompatAlloc general definitions : -----------------------------
template<class Alloc>
class CompatAlloc
{ // general case : be transparent
public:
typedef Alloc compatible_type;
};
} //N.S. io
} // N.S. boost
#endif // include guard
include/boost/format/detail/workarounds_gcc-2_95.hpp view on Meta::CPAN
// ----------------------------------------------------------------------------
// There's a lot to do, the stdlib shipped with gcc prior to 3.x
// was terribly non-conforming.
// . defines macros switches
// . supplies template classes basic_foo<char,Tr> where gcc only supplies foo.
// i.e :
// - basic_ios<char, Tr> from ios
// - basic_ostream<char, Tr> from ostream
// - basic_srteambuf<char, Tr> from streambuf
// these can be used transparently. (it obviously does not work for wchar_t)
// . specialise CompatAlloc and CompatTraits to wrap gcc-2.95's
// string_char_traits and std::alloc
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
// only for gcc-2.95's native stdlib
#ifndef BOOST_FORMAT_WORKAROUNDS_GCC295_H
#define BOOST_FORMAT_WORKAROUNDS_GCC295_H
// SGI STL doesnt have <ostream> and others, so we need iostream.
include/boost/serialization/is_abstract.hpp view on Meta::CPAN
typedef BOOST_DEDUCED_TYPENAME mpl::bool_<false> type;
BOOST_STATIC_CONSTANT(bool, value = false);
#else
typedef BOOST_DEDUCED_TYPENAME boost::is_abstract<T>::type type;
BOOST_STATIC_CONSTANT(bool, value = type::value);
#endif
};
} // namespace serialization
} // namespace boost
// define a macro to make explicit designation of this more transparent
#define BOOST_IS_ABSTRACT(T) \
namespace boost { \
namespace serialization { \
template<> \
struct is_abstract< T > { \
typedef mpl::bool_<true> type; \
BOOST_STATIC_CONSTANT(bool, value = true); \
}; \
} \
} \
( run in 1.002 second using v1.01-cache-2.11-cpan-a1d94b6210f )