Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

TR1 By Subject

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Chapter 36. Boost.TR1

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
#include <boost/tr1/functional.hpp>

или

#include <functional>

Библиотека Ref - это небольшая библиотека, которая полезна для передачи ссылок на шаблоны функций (алгоритмы), которые обычно берут копии своих аргументов. Он определяет шаблон класса<reference_wrapper<T>>и две функции<ref>и<cref>, которые возвращают экземпляры<reference_wrapper<T>>.Речь идет о росте. Свяжитесь для получения дополнительной информации.

namespace std {
namespace tr1 {
template <class T> class reference_wrapper;
template <class T> reference_wrapper<T> ref(T&);
template <class T> reference_wrapper<const T> cref(const T&);
template <class T> reference_wrapper<T> ref(reference_wrapper<T>);
template <class T> reference_wrapper<const T> cref(reference_wrapper<T>);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_REFERENCE_WRAPPER, если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Версия Boost этого компонента в настоящее время не поддерживает вызов функции (2.1.2.4) или вывод из std::unary_function или std::binary_function (2.1.2, пункты 3 и 4).

Версия Boost не конвертируется в T&, как того требует TR.

#include <boost/tr1/memory.hpp>

или

#include <memory>

Шаблон класса<shared_ptr>хранит указатель на динамически выделенный объект, обычно с новым выражением C++. Указанные объекты гарантированно удаляются, когда последние<shared_ptr>, указывающие на них, уничтожаются или сбрасываются. Для получения дополнительной информации обратитесь кshared_ptrиweak_ptrдокументации.

namespace std {
namespace tr1 {
class bad_weak_ptr;
// [2.2.3] Class template shared_ptr
template<class T> class shared_ptr;
// [2.2.3.6] shared_ptr comparisons
template<class T, class U> bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b);
template<class T, class U> bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b);
template<class T, class U> bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b);
// [2.2.3.8] shared_ptr specialized algorithms
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);
// [2.2.3.9] shared_ptr casts
template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r);
template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r);
template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r);
// [2.2.3.7] shared_ptr I/O
template<class E, class T, class Y>
basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
// [2.2.3.10] shared_ptr get_deleter
template<class D, class T> D * get_deleter(shared_ptr<T> const& p);
// [2.2.4] Class template weak_ptr
template<class T> class weak_ptr;
// [2.2.4.6] weak_ptr comparison
template<class T, class U> bool operator<(weak_ptr<T> const& a, weak_ptr<U> const& b);
// [2.2.4.7] weak_ptr specialized algorithms
template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b);
// [2.2.5] Class enable_shared_from_this
template<class T> class enable_shared_from_this;
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_SHARED_PTR, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Отклонений от стандарта при использовании версии Boost данного компонента нет.

#include <boost/tr1/functional.hpp>

или

#include <functional>

Шаблон класса<result_of>помогает определить тип выражения вызова. При наличии lvalue<f>типа<F>и lvalues<t1>,<t2,..., tN>типов<T1,T2, ...,TN>соответственно, type<result_of<F(T1,T2,...,TN)>::type>определяет тип результата выражения<f(t1, t2,...,tN)>. Реализация позволяет типу<F>быть указателем функции, эталоном функции, указателем функции члена или типом класса. Для получения дополнительной информацииобратитесь к Boost. Полезная документация.

namespace std {
namespace tr1 {
template <class T>
struct result_of
{
   typedef unspecified type;
};
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_RESULT_OF Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/functional.hpp>

или

#include <functional>

<std::tr1::mem_fn>является обобщением стандартных функций<std::mem_fun>и<std::mem_fun_ref>. Он поддерживает указатели функций-членов с более чем одним аргументом, и возвращенный объект функции может принять указатель, ссылку или интеллектуальный указатель на экземпляр объекта в качестве своего первого аргумента.<mem_fn>также поддерживает указатели на членов данных, рассматривая их как функции, не принимающие аргументов и возвращающие (const) ссылку на члена. Для получения дополнительной информации обратитесь кBoost. Документация Mem_fn.

namespace std {
namespace tr1 {
template <class R, class T> unspecified mem_fn(R T::* pm);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_MEM_FN Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Реализация Boost не производит функторов, которые наследуются от<std::unary_function>или<std::binary_function>, и не работает правильно с указателями на летучие функции члена (это должно быть чрезвычайно редко на практике, однако).

#include <boost/tr1/functional.hpp>

или

#include <functional>

<std::tr1::bind>является обобщением стандартных функций<std::bind1st>и<std::bind2nd>. Он поддерживает произвольные функциональные объекты, функции, указатели функций и указатели функций членов и способен связывать любой аргумент с конкретным значением или маршрутом входных аргументов в произвольные позиции.<bind>не предъявляет никаких требований к объекту функции; в частности, ему не нужны стандартные типдефы<result_type>,<first_argument_type>и<second_argument_type>. Для получения дополнительной информации обратитесь кBoost. Обязательная документация.

namespace std {
namespace tr1 {
// [3.6] Function object binders
template<class T> struct is_bind_expression;
template<class T> struct is_placeholder;
template<class F, class T1, ..., class Tn > unspecified bind(F f, T1 t1, ..., Tn tn );
template<class R, class F, class T1, ..., class Tn > unspecified bind(F f, T1 t1, ..., Tn tn );
namespace placeholders {
   // M is the implementation-defined number of placeholders
   extern unspecified _1;
   extern unspecified _2;
   .
   .
   .
   extern unspecified _M;
}
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_BIND, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Классы признаков<is_placeholder>и<is_bind_expression>не поддерживаются реализацией Boost.

Именованный синтаксис возвращаемого значения не поддерживается, если объект, связанный, является указателем функции, например:

std::tr1::bind(&my_proc, arg1, arg2 /* etc */); // works OK.
std::tr1::bind<double>(&my_proc, arg1, arg2 /* etc */); // causes compiler error.
std::tr1::bind<double>(my_function_object, arg1, arg2 /* etc */); // works OK.

С другой стороны, реализация Boost работает с указателями для перегруженных функций и необязательно с указателями функций с нестандартными соглашениями вызова.

#include <boost/tr1/functional.hpp>

или

#include <functional>

Полиморфные функциональные обертки представляют собой семейство шаблонов классов, которые могут использоваться в качестве обобщенного механизма обратного вызова. Полиморфная обертка функций имеет функции с указателями функций, в которых оба определяют интерфейс вызова (например, функцию, принимающую два целых аргумента и возвращающую значение с плавающей точкой), через который может быть вызван некоторый произвольный код. Однако полиморфная обертка функции может вызывать любой вызывающий объект с совместимой подписью вызова, это может быть указателем функции, или это может быть функциональный объект, создаваемый std::tr1::bind, или каким-либо другим механизмом. Для получения дополнительной информации см. документациюBoost.Function.

namespace std {
namespace tr1 {
// [3.7] polymorphic function wrappers
class bad_function_call;
template<class Function>
class function;
template<class Function>
void swap(function<Function>&, function<Function>&);
template<class Function1, class Function2>
void operator==(const function<Function1>&, const function<Function2>&);
template<class Function1, class Function2>
void operator!=(const function<Function1>&, const function<Function2>&);
template <class Function>
bool operator==(const function<Function>&, unspecified-null-pointer-type );
template <class Function>
bool operator==(unspecified-null-pointer-type , const function<Function>&);
template <class Function>
bool operator!=(const function<Function>&, unspecified-null-pointer-type );
template <class Function>
bool operator!=(unspecified-null-pointer-type , const function<Function>&);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_FUNCTION Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Версия Boost<std::tr1::function>не имеет функции члена<target_type()>и не наследует от<std::unary_function>или<std::binary_function>, когда это применимо. Функция-цель() участника может получить доступ только к целям-указателям-члену, когда они были завернуты в mem_fn.

#include <boost/tr1/type_traits.hpp>

или

#include <type_traits>

Характеристики типов позволяют общему коду получить доступ к фундаментальным свойствам типа, определить взаимосвязь между двумя типами или преобразовать один тип в другой родственный тип. Для получения дополнительной информации обратитесь к документацииBoost.Type_traits.

namespace std {
namespace tr1 {
template <class T, T v> struct integral_constant;
typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;
// [4.5.1] primary type categories:
template <class T> struct is_void;
template <class T> struct is_integral;
template <class T> struct is_floating_point;
template <class T> struct is_array;
template <class T> struct is_pointer;
template <class T> struct is_reference;
template <class T> struct is_member_object_pointer;
template <class T> struct is_member_function_pointer;
template <class T> struct is_enum;
template <class T> struct is_union;
template <class T> struct is_class;
template <class T> struct is_function;
// [4.5.2] composite type categories:
template <class T> struct is_arithmetic;
template <class T> struct is_fundamental;
template <class T> struct is_object;
template <class T> struct is_scalar;
template <class T> struct is_compound;
template <class T> struct is_member_pointer;
// [4.5.3] type properties:
template <class T> struct is_const;
template <class T> struct is_volatile;
template <class T> struct is_pod;
template <class T> struct is_empty;
template <class T> struct is_polymorphic;
template <class T> struct is_abstract;
template <class T> struct has_trivial_constructor;
template <class T> struct has_trivial_copy;
template <class T> struct has_trivial_assign;
template <class T> struct has_trivial_destructor;
template <class T> struct has_nothrow_constructor;
template <class T> struct has_nothrow_copy;
template <class T> struct has_nothrow_assign;
template <class T> struct has_virtual_destructor;
template <class T> struct is_signed;
template <class T> struct is_unsigned;
template <class T> struct alignment_of;
template <class T> struct rank;
template <class T, unsigned I = 0> struct extent;
// [4.6] type relations:
template <class T, class U> struct is_same;
template <class Base, class Derived> struct is_base_of;
template <class From, class To> struct is_convertible;
// [4.7.1] const-volatile modifications:
template <class T> struct remove_const;
template <class T> struct remove_volatile;
template <class T> struct remove_cv;
template <class T> struct add_const;
template <class T> struct add_volatile;
template <class T> struct add_cv;
// [4.7.2] reference modifications:
template <class T> struct remove_reference;
template <class T> struct add_reference;
// [4.7.3] array modifications:
template <class T> struct remove_extent;
template <class T> struct remove_all_extents;
// [4.7.4] pointer modifications:
template <class T> struct remove_pointer;
template <class T> struct add_pointer;
// [4.8] other transformations:
template <std::size_t Len, std::size_t Align> struct aligned_storage;
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_TYPE_TRAITS Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/random.hpp>

или

#include <random>

Библиотека случайных чисел разделена на три части:генераторы, которые являются нулевыми функторами, производящими однородные распределения случайных чисел.Распределения, которые являются унарными функторами, адаптирующими генератор к некоторому специфическому виду распределения. И шаблон классаvariate_generator, который объединяет генератор с распределением, для создания нового генератора. Более подробную информацию см. в. Случайная документация.

namespace std {
namespace tr1 {
// [5.1.3] Class template variate_generator
template<class UniformRandomNumberGenerator, class Distribution>
class variate_generator;
// [5.1.4.1] Class template linear_congruential
template<class IntType, IntType a, IntType c, IntType m>
class linear_congruential;
// [5.1.4.2] Class template mersenne_twister
template<class UIntType, int w, int n, int m, int r,
UIntType a, int u, int s, UIntType b, int t, UIntType c, int l>
class mersenne_twister;
// [5.1.4.3] Class template substract_with_carry
template<class IntType, IntType m, int s, int r>
class subtract_with_carry;
// [5.1.4.4] Class template substract_with_carry_01
template<class RealType, int w, int s, int r>
class subtract_with_carry_01;
// [5.1.4.5] Class template discard_block
template<class UniformRandomNumberGenerator, int p, int r>
class discard_block;
// [5.1.4.6] Class template xor_combine
template<class UniformRandomNumberGenerator1, int s1,
class UniformRandomNumberGenerator2, int s2>
class xor_combine;
// [5.1.5] Predefined generators
typedef linear_congruential<
            implementation-defined ,
            16807,
            0,
            2147483647> minstd_rand0;
typedef linear_congruential<
            implementation-defined ,
            48271,
            0,
            2147483647> minstd_rand;
typedef mersenne_twister<
            implementation-defined ,
            32, 624, 397, 31,
            0x9908b0df, 11, 7,
            0x9d2c5680, 15,
            0xefc60000, 18> mt19937;
typedef subtract_with_carry_01<
            float,
            24,
            10,
            24> ranlux_base_01;
typedef subtract_with_carry_01<
            double,
            48,
            10,
            24> ranlux64_base_01;
typedef discard_block<
            subtract_with_carry<
                  implementation-defined ,
                  (1<<24),
                  10,
                  24>,
            223,
            24> ranlux3;
typedef discard_block<
            subtract_with_carry<
                  implementation-defined,
                  (1<<24),
                  10,
                  24>,
            389,
            24> ranlux4;
typedef discard_block<
            subtract_with_carry_01<
                  float,
                  24,
                  10,
                  24>,
            223,
            24> ranlux3_01;
typedef discard_block<
            subtract_with_carry_01<
                  float,
                  24,
                  10,
                  24>,
            389,
            24> ranlux4_01;
// [5.1.6] Class random_device
class random_device;
// [5.1.7.1] Class template uniform_int
template<class IntType = int>
class uniform_int;
// [5.1.7.2] Class bernoulli_distribution
class bernoulli_distribution;
// [5.1.7.3] Class template geometric_distribution
template<class IntType = int, class RealType = double>
class geometric_distribution;
// [5.1.7.4] Class template poisson_distribution
template<class IntType = int, class RealType = double>
class poisson_distribution;
// [5.1.7.5] Class template binomial_distribution
template<class IntType = int, class RealType = double>
class binomial_distribution;
// [5.1.7.6] Class template uniform_real
template<class RealType = double>
class uniform_real;
// [5.1.7.7] Class template exponential_distribution
template<class RealType = double>
class exponential_distribution;
// [5.1.7.8] Class template normal_distribution
template<class RealType = double>
class normal_distribution;
// [5.1.7.9] Class template gamma_distribution
template<class RealType = double>
class gamma_distribution;
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_RANDOM, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Реализация Boost имеет следующие ограничения:

  • Линейный_конгруэнтный генератор полностью поддерживается только для подписанных целых типов (неподписанные типы, вероятно, работают только тогда, когда модуль равен нулю).
  • Шаблон subtract_with_carry не поддерживает модуль нуля.
  • Не все стандартные типы генераторов имеют документацию Boost, но они поддерживаются.
  • Класс шаблона variate_generator не имеет шаблона унарной функции call operator(), только нешаблонная нулевая версия.

Обратите внимание, что большинство генераторов случайных чисел были повторно реализованы в виде тонких оберток вокруг версий Boost, чтобы обеспечить стандартный интерфейс (все версии Boost берут дополнительный, избыточный параметр шаблона и инициализируются итераторами, а не функторами).

#include <boost/tr1/tuple.hpp>

или

#include <tuple>

Кортеж - это коллекция элементов фиксированного размера. Пары, тройные, четверные и т.д. являются парными. На языке программирования кортеж — это объект данных, содержащий в качестве элементов другие объекты. Эти объекты элементов могут быть разных типов. Трубы удобны во многих обстоятельствах. Например, связки позволяют легко определить функции, которые возвращают более одного значения. Некоторые языки программирования, такие как ML, Python и Haskell, имеют встроенные конструкции. К сожалению, C++ этого не делает. Чтобы компенсировать этот «дефицит», библиотека TR1 Tuple реализует конструкцию с использованием шаблонов. Более подробную информацию см. вBoost Tuple Library Documentation.

namespace std {
namespace tr1 {
// [6.1.3] Class template tuple
template <class T1 = unspecified ,
class T2 = unspecified ,
...,
class TM = unspecified > class tuple;
// [6.1.3.2] Tuple creation functions
const unspecified ignore;
template<class T1, class T2, ..., class TN>
tuple<V1, V2, ..., VN> make_tuple(const T1&, const T2& , ..., const TN&);
// [6.1] Tuple types Containers
template<class T1, class T2, ..., class TN>
tuple<T1&, T2&, ..., TN&> tie(T1&, T2& , ..., TN&);
// [6.1.3.3] Tuple helper classes
template <class T> class tuple_size;
template <int I, class T> class tuple_element;
// [6.1.3.4] Element access
template <int I, class T1, class T2, ..., class TN>
RI get(tuple<T1, T2, ..., TN>&);
template <int I, class T1, class T2, ..., class TN>
PI get(const tuple<T1, T2, ..., TN>&);
// [6.1.3.5] relational operators
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator==(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator<(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator!=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator>(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator<=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
bool operator>=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_TUPLE, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Нет известных проблем для компиляторов.

#include <boost/tr1/utility.hpp>

или

#include <utility>

Существующий шаблон класса std::pair также может быть доступен с помощью интерфейсаtuple.

namespace std {
namespace tr1 {
template <class T> class tuple_size; // forward declaration
template <int I, class T> class tuple_element; // forward declaration
template <class T1, class T2> struct tuple_size<std::pair<T1, T2> >;
template <class T1, class T2> struct tuple_element<0, std::pair<T2, T2> >;
template <class T1, class T2> struct tuple_element<1, std::pair<T2, T2> >;
// see below for definition of "P".
template<int I, class T1, class T2> P& get(std::pair<T1, T2>&);
template<int I, class T1, class T2> const P& get(const std::pair<T1, T2>&);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_UTILITY, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/array.hpp>

или

#include <array>

Массив шаблона класса - это массив фиксированного размера, который является более безопасным и не менее эффективным, чем массив в стиле C. Массив классов отвечает практически всем требованиям обратимого контейнера (см. Раздел 23.1, [lib.container.requirements] Стандарта C++). Для получения дополнительной информации обратитесь кBoost. Архивная документация.

namespace std {
namespace tr1 {
// [6.2.2] Class template array
template <class T, size_t N > struct array;
// Array comparisons
template <class T, size_t N> bool operator== (const array<T,N>& x, const array<T,N>& y);
template <class T, size_t N> bool operator< (const array<T,N>& x, const array<T,N>& y);
template <class T, size_t N> bool operator!= (const array<T,N>& x, const array<T,N>& y);
template <class T, size_t N> bool operator> (const array<T,N>& x, const array<T,N>& y);
template <class T, size_t N> bool operator>= (const array<T,N>& x, const array<T,N>& y);
template <class T, size_t N> bool operator<= (const array<T,N>& x, const array<T,N>& y);
// [6.2.2.2] Specialized algorithms
template <class T, size_t N > void swap(array<T,N>& x, array<T,N>& y);
// [6.2.2.5] Tuple interface to class template array
template <class T> class tuple_size; // forward declaration
template <int I, class T> class tuple_element; // forward declaration
template <class T, size_t N> struct tuple_size<array<T, N> >;
template <int I, class T, size_t N> struct tuple_element<I, array<T, N> >;
template <int I, class T, size_t N> T& get( array<T, N>&);
template <int I, class T, size_t N> const T& get(const array<T, N>&);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_ARRAY, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Неизвестных проблем с Boost-1.34 нет.

#include <boost/tr1/functional.hpp>

или

#include <functional>

Шаблон класса std::hash является унарным функтором, который преобразует некоторый тип T в хэш-значение, специализации std::hash предусмотрены для целых чисел, символов, плавающей точки и типов указателей, а также двух типов строк std::string и std::wstring. См. документациюBoost.Hashдля получения дополнительной информации.

namespace std {
namespace tr1 {
template <class T>
struct hash : public unary_function<T, size_t>
{
   size_t operator()(T val)const;
};
// Hash function specializations
template <> struct hash<bool>;
template <> struct hash<char>;
template <> struct hash<signed char>;
template <> struct hash<unsigned char>;
template <> struct hash<wchar_t>;
template <> struct hash<short>;
template <> struct hash<int>;
template <> struct hash<long>;
template <> struct hash<unsigned short>;
template <> struct hash<unsigned int>;
template <> struct hash<unsigned long>;
template <> struct hash<float>;
template <> struct hash<double>;
template <> struct hash<long double>;
template<class T> struct hash<T*>;
template <> struct hash<std::string>;
template <> struct hash<std::wstring>;
} // namespace tr1
} // namespace std

176Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_HASH, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Повышение. Hash добавляет специализации std::hash для более широкого спектра типов, чем те, которые требуются TR1: Boost. Hash выступает в качестве испытательного стенда для выпуска 6.18 вСписке технических отчетов о расширении библиотеки.

[Note] Note

В этом шаблоне есть проблемы с переносимостью - в частности, шаблон<hash>может фактически не определяться внутри пространства имен std::tr1, что делает пользовательские специализации шаблона непортативными. Например, Visual C++ 2010 определяет<hash>в пространстве имен<std>, а затем импортирует это в<std::tr1>с помощью декларации использования.

#include <boost/tr1/regex.hpp>

или

#include <regex>

Эта библиотека обеспечивает всестороннюю поддержку регулярных выражений, включая итератор или сопоставление на основе строк, поиск, поиск и замену, итерацию и токенизацию. Поддерживаются регулярные выражения POSIX и ECMAScript (JavaScript). Более подробную информацию см. в. Документация Regex.

namespace std {
namespace tr1 {
// [7.5] Regex constants
namespace regex_constants {
typedef bitmask_type syntax_option_type;
typedef bitmask_type match_flag_type;
typedef implementation-defined error_type;
} // namespace regex_constants
// [7.6] Class regex_error
class regex_error;
// [7.7] Class template regex_traits
template <class charT> struct regex_traits;
// [7.8] Class template basic_regex
template <class charT, class traits = regex_traits<charT> >
class basic_regex;
typedef basic_regex<char> regex;
typedef basic_regex<wchar_t> wregex;
// [7.8.6] basic_regex swap
template <class charT, class traits>
void swap(basic_regex<charT, traits>& e1,
         basic_regex<charT, traits>& e2);
// [7.9] Class template sub_match
template <class BidirectionalIterator>
class sub_match;
typedef sub_match<const char*> csub_match;
typedef sub_match<const wchar_t*> wcsub_match;
typedef sub_match<string::const_iterator> ssub_match;
typedef sub_match<wstring::const_iterator> wssub_match;
// [7.9.2] sub_match non-member operators
/* Comparison operators omitted for clarity.... */
template <class charT, class ST, class BiIter>
basic_ostream<charT, ST>&
   operator<<(basic_ostream<charT, ST>& os,
            const sub_match<BiIter>& m);
// [7.10] Class template match_results
template <class BidirectionalIterator,
         class Allocator = allocator<sub_match<BidirectionalIterator> > >
class match_results;
typedef match_results<const char*> cmatch;
typedef match_results<const wchar_t*> wcmatch;
typedef match_results<string::const_iterator> smatch;
typedef match_results<wstring::const_iterator> wsmatch;
// match_results comparisons
template <class BidirectionalIterator, class Allocator>
bool operator== (const match_results<BidirectionalIterator, Allocator>& m1,
               const match_results<BidirectionalIterator, Allocator>& m2);
template <class BidirectionalIterator, class Allocator>
bool operator!= (const match_results<BidirectionalIterator, Allocator>& m1,
               const match_results<BidirectionalIterator, Allocator>& m2);
// [7.10.6] match_results swap
template <class BidirectionalIterator, class Allocator>
void swap(match_results<BidirectionalIterator, Allocator>& m1,
         match_results<BidirectionalIterator, Allocator>& m2);
// [7.11.2] Function template regex_match
template <class BidirectionalIterator, class Allocator, class charT, class traits>
bool regex_match(BidirectionalIterator first,
               BidirectionalIterator last,
               match_results<BidirectionalIterator, Allocator>& m,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
template <class BidirectionalIterator, class charT, class traits>
bool regex_match(BidirectionalIterator first,
               BidirectionalIterator last,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
template <class charT, class Allocator, class traits>
bool regex_match(const charT* str,
               match_results<const charT*, Allocator>& m,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
template <class ST, class SA, class Allocator, class charT, class traits>
bool regex_match(const basic_string<charT, ST, SA>& s,
               match_results<typename basic_string<charT, ST, SA>::const_iterator,Allocator>& m,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
template <class charT, class traits>
bool regex_match(const charT* str,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
template <class ST, class SA, class charT, class traits>
bool regex_match(const basic_string<charT, ST, SA>& s,
               const basic_regex<charT, traits>& e,
               regex_constants::match_flag_type flags = regex_constants::match_default);
// [7.11.3] Function template regex_search
template <class BidirectionalIterator, class Allocator, class charT, class traits>
bool regex_search(BidirectionalIterator first,
                  BidirectionalIterator last,
                  match_results<BidirectionalIterator, Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
template <class BidirectionalIterator, class charT, class traits>
bool regex_search(BidirectionalIterator first,
                  BidirectionalIterator last,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
template <class charT, class Allocator, class traits>
bool regex_search(const charT* str,
                  match_results<const charT*, Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
template <class charT, class traits>
bool regex_search(const charT* str,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
template <class ST, class SA, class charT, class traits>
bool regex_search(const basic_string<charT, ST, SA>& s,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
template <class ST, class SA, class Allocator, class charT, class traits>
bool regex_search(const basic_string<charT, ST, SA>& s,
                  match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
// [7.11.4] Function template regex_replace
template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
OutputIterator regex_replace(OutputIterator out,
                           BidirectionalIterator first,
                           BidirectionalIterator last,
                           const basic_regex<charT, traits>& e,
                           const basic_string<charT>& fmt,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
template <class traits, class charT>
basic_string<charT> regex_replace(const basic_string<charT>& s,
                                       const basic_regex<charT, traits>& e,
                                       const basic_string<charT>& fmt,
                                       regex_constants::match_flag_type flags = regex_constants::match_default);
// [7.12.1] Class template regex_iterator
template <class BidirectionalIterator,
         class charT = typename iterator_traits<BidirectionalIterator>::value_type,
         class traits = regex_traits<charT> >
class regex_iterator;
typedef regex_iterator<const char*> cregex_iterator;
typedef regex_iterator<const wchar_t*> wcregex_iterator;
typedef regex_iterator<string::const_iterator> sregex_iterator;
typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
// [7.12.2] Class template regex_token_iterator
template <class BidirectionalIterator,
         class charT = typename iterator_traits<BidirectionalIterator>::value_type,
         class traits = regex_traits<charT> >
class regex_token_iterator;
typedef regex_token_iterator<const char*> cregex_token_iterator;
typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
typedef regex_token_iterator<string::const_iterator> sregex_token_iterator;
typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_REGEX, если стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/complex.hpp>

или

#include <complex>

Следующие шаблоны функций имеют дополнительные перегрузки:<arg>,<norm>,<conj>,<polar>,<imag>и<real>.

Дополнительных перегрузок достаточно для обеспечения:

  • Если аргумент имеет тип<long double>, то перегрузка ведет себя так, как если бы аргумент был брошен на<std::complex<longdouble>>.
  • В противном случае, если аргумент имеет тип<double>или является целым типом, то перегрузка ведет себя так, как если бы аргумент был отлит<std::complex<double>>.
  • В противном случае, если аргумент имеет тип<float>, то перегрузка ведет себя так, как если бы аргумент был брошен на<std::complex<float>>.

Шаблон функции<pow>имеет дополнительные перегрузки, достаточные для обеспечения, по меньшей мере, одного аргумента типа<std::complex<T>>:

  • Если аргумент имеет тип<complex<longdouble>>или тип<longdouble>, то перегрузка ведет себя так, как если бы оба аргумента были брошены на<std::complex<longdouble>>.
  • В противном случае, если аргумент имеет тип<complex<double>>,<double>или целочисленный тип, то перегрузка ведет себя так, как если бы оба аргумента были брошены на<std::complex<double>>.
  • В противном случае, если аргумент имеет тип<complex<float>>или<float>, то перегрузка ведет себя так, как если бы оба аргумента были брошены на<std::complex<float>>.

В следующем синопсисе<Real>является типом с плавающей точкой,<Arithmetic>является целым числом или типом с плавающей точкой, и<PROMOTE(X1... XN)>является самым большим типом с плавающей точкой в списке X1-XN после того, как любые типы с не плавающей точкой в списке были заменены типом<double>.

template <class Arithmetic>
PROMOTE(Arithmetic) arg(const Arithmetic& t);
template <class Arithmetic>
PROMOTE(Arithmetic) norm(const Arithmetic& t);
template <class Arithmetic>
complex<PROMOTE(Arithmetic)> conj(const Arithmetic& t);
template <class Arithmetic1, class Arithmetic2>
complex<PROMOTE(Arithmetic1,Arithmetic2)> polar(const Arithmetic1& rho, const Arithmetic2& theta = 0);
template <class Arithmetic>
PROMOTE(Arithmetic) imag(const Arithmetic& );
template <class Arithmetic>
PROMOTE(Arithmetic) real(const Arithmetic& t);
template<class Real1, class Real2>
complex<PROMOTE(Real1, Real2)>
   pow(const complex<Real1>& x, const complex<Real2>& y);
template<class Real, class Arithmetic>
complex<PROMOTE(Real, Arithmetic)>
   pow (const complex<Real>& x, const Arithmetic& y);
template<class Arithmetic, class Real>
complex<PROMOTE(Real, Arithmetic)>
   pow (const Arithmetic& x, const complex<Real>& y);

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_COMPLEX_OVERLOADS Если в стандартной библиотеке реализованы дополнительные перегрузки для существующих сложных арифметических функций.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/complex.hpp>

или

#include <complex>

Алгоритмы<acos>,<asin>,<atan>,<acosh>,<asinh>,<atanh>и<fabs>перегружены для аргументов типа<std::complex<T>>. Эти алгоритмы являются полностью классическими и ведут себя так, как указано в стандартном разделе 7.3.5 C99. Смотрите. Математическая документация для получения дополнительной информации.

namespace std {
namespace tr1 {
template<class T> complex<T> acos(complex<T>& x);
template<class T> complex<T> asin(complex<T>& x);
template<class T> complex<T> atan(complex<T>& x);
template<class T> complex<T> acosh(complex<T>& x);
template<class T> complex<T> asinh(complex<T>& x);
template<class T> complex<T> atanh(complex<T>& x);
template<class T> complex<T> fabs(complex<T>& x);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG Если в стандартной библиотеке реализованы дополнительные функции обратного трига.

Стандартное соответствие:Никаких проблем.

#include <boost/tr1/unordered_set.hpp>

или

#include <unordered_set>

Для доступа к данным на основе поиска ключей стандартная библиотека C++ предлагает std::set, std::map, std::multiset и std::multimap. Они обычно реализуются с использованием сбалансированных двоичных деревьев, так что время поиска имеет логарифмическую сложность. Как правило, это нормально, но во многих случаях хеш-таблица может работать лучше, поскольку доступ к данным в среднем имеет постоянную сложность. В худшем случае сложность линейна, но этого редко и с некоторой осторожностью можно избежать.

Имея это в виду, стандартный библиотечный технический отчет C++ представил неупорядоченные ассоциативные контейнеры, которые реализуются с использованием хеш-таблицы, и теперь они были добавлены в рабочий проект стандарта C++.

Для получения дополнительной информации обратитесь кнеупорядоченным библиотечным документам.

namespace std {
namespace tr1 {
template <class Value,
         class Hash = hash<Value>,
         class Pred = std::equal_to<Value>,
         class Alloc = std::allocator<Value> >
class unordered_set;
// [6.3.4.5] Class template unordered_multiset
template <class Value,
         class Hash = hash<Value>,
         class Pred = std::equal_to<Value>,
         class Alloc = std::allocator<Value> >
class unordered_multiset;
template <class Value, class Hash, class Pred, class Alloc>
void swap(unordered_set<Value, Hash, Pred, Alloc>& x,
         unordered_set<Value, Hash, Pred, Alloc>& y);
template <class Value, class Hash, class Pred, class Alloc>
void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x,
         unordered_multiset<Value, Hash, Pred, Alloc>& y);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_UNORDERED_SET Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Нет известных проблем для компиляторов.

#include <boost/tr1/unordered_map.hpp>

или

#include <unordered_map>

Для доступа к данным на основе поиска ключей стандартная библиотека C++ предлагает std::set, std::map, std::multiset и std::multimap. Они обычно реализуются с использованием сбалансированных двоичных деревьев, так что время поиска имеет логарифмическую сложность. Как правило, это нормально, но во многих случаях хеш-таблица может работать лучше, поскольку доступ к данным в среднем имеет постоянную сложность. В худшем случае сложность линейна, но этого редко и с некоторой осторожностью можно избежать.

Имея это в виду, стандартный библиотечный технический отчет C++ представил неупорядоченные ассоциативные контейнеры, которые реализуются с использованием хеш-таблицы, и теперь они были добавлены в рабочий проект стандарта C++.

Для получения дополнительной информации обратитесь кнеупорядоченным библиотечным документам.

namespace std {
namespace tr1 {
// [6.3.4.4] Class template unordered_map
template <class Key,
         class T,
         class Hash = hash<Key>,
         class Pred = std::equal_to<Key>,
         class Alloc = std::allocator<std::pair<const Key, T> > >
class unordered_map;
// [6.3.4.6] Class template unordered_multimap
template <class Key,
         class T,
         class Hash = hash<Key>,
         class Pred = std::equal_to<Key>,
         class Alloc = std::allocator<std::pair<const Key, T> > >
class unordered_multimap;
template <class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
         unordered_map<Key, T, Hash, Pred, Alloc>& y);
template <class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
         unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
} // namespace tr1
} // namespace std

Конфигурация:Boost.Configдолжен (автоматически) определять макрос BOOST_HAS_TR1_UNORDERED_MAP Если ваша стандартная библиотека реализует эту часть TR1.

Стандартное соответствие:Нет известных проблем для компиляторов.

TR добавляет 23 специальные функции (плюс поплавок и длинные двойные перегрузки) для заголовка.

Для получения дополнительной информации обратитесь кMath Library docs.

namespace std {
namespace tr1 {
// [5.2.1.1] associated Laguerre polynomials:
double assoc_laguerre(unsigned n, unsigned m, double x);
float assoc_laguerref(unsigned n, unsigned m, float x);
long double assoc_laguerrel(unsigned n, unsigned m, long double x);
// [5.2.1.2] associated Legendre functions:
double assoc_legendre(unsigned l, unsigned m, double x);
float assoc_legendref(unsigned l, unsigned m, float x);
long double assoc_legendrel(unsigned l, unsigned m, long double x);
// [5.2.1.3] beta function:
double beta(double x, double y);
float betaf(float x, float y);
long double betal(long double x, long double y);
// [5.2.1.4] (complete) elliptic integral of the first kind:
double comp_ellint_1(double k);
float comp_ellint_1f(float k);
long double comp_ellint_1l(long double k);
// [5.2.1.5] (complete) elliptic integral of the second kind:
double comp_ellint_2(double k);
float comp_ellint_2f(float k);
long double comp_ellint_2l(long double k);
// [5.2.1.6] (complete) elliptic integral of the third kind:
double comp_ellint_3(double k, double nu);
float comp_ellint_3f(float k, float nu);
long double comp_ellint_3l(long double k, long double nu);
// [5.2.1.7] confluent hypergeometric functions:
double conf_hyperg(double a, double c, double x);
float conf_hypergf(float a, float c, float x);
long double conf_hypergl(long double a, long double c, long double x);
// [5.2.1.8] regular modified cylindrical Bessel functions:
double cyl_bessel_i(double nu, double x);
float cyl_bessel_if(float nu, float x);
long double cyl_bessel_il(long double nu, long double x);
// [5.2.1.9] cylindrical Bessel functions (of the first kind):
double cyl_bessel_j(double nu, double x);
float cyl_bessel_jf(float nu, float x);
long double cyl_bessel_jl(long double nu, long double x);
// [5.2.1.10] irregular modified cylindrical Bessel functions:
double cyl_bessel_k(double nu, double x);
float cyl_bessel_kf(float nu, float x);
long double cyl_bessel_kl(long double nu, long double x);
// [5.2.1.11] cylindrical Neumann functions;
// cylindrical Bessel functions (of the second kind):
double cyl_neumann(double nu, double x);
float cyl_neumannf(float nu, float x);
long double cyl_neumannl(long double nu, long double x);
// [5.2.1.12] (incomplete) elliptic integral of the first kind:
double ellint_1(double k, double phi);
float ellint_1f(float k, float phi);
long double ellint_1l(long double k, long double phi);
// [5.2.1.13] (incomplete) elliptic integral of the second kind:
double ellint_2(double k, double phi);
float ellint_2f(float k, float phi);
long double ellint_2l(long double k, long double phi);
// [5.2.1.14] (incomplete) elliptic integral of the third kind:
double ellint_3(double k, double nu, double phi);
float ellint_3f(float k, float nu, float phi);
long double ellint_3l(long double k, long double nu, long double phi);
// [5.2.1.15] exponential integral:
double expint(double x);
float expintf(float x);
long double expintl(long double x);
// [5.2.1.16] Hermite polynomials:
double hermite(unsigned n, double x);
float hermitef(unsigned n, float x);
long double hermitel(unsigned n, long double x);
// [5.2.1.17] hypergeometric functions:
double hyperg(double a, double b, double c, double x);
float hypergf(float a, float b, float c, float x);
long double hypergl(long double a, long double b, long double c, long double x);
// [5.2.1.18] Laguerre polynomials:
double laguerre(unsigned n, double x);
float laguerref(unsigned n, float x);
long double laguerrel(unsigned n, long double x);
// [5.2.1.19] Legendre polynomials:
double legendre(unsigned l, double x);
float legendref(unsigned l, float x);
long double legendrel(unsigned l, long double x);
// [5.2.1.20] Riemann zeta function:
double riemann_zeta(double);
float riemann_zetaf(float);
long double riemann_zetal(long double);
// [5.2.1.21] spherical Bessel functions (of the first kind):
double sph_bessel(unsigned n, double x);
float sph_besself(unsigned n, float x);
long double sph_bessell(unsigned n, long double x);
// [5.2.1.22] spherical associated Legendre functions:
double sph_legendre(unsigned l, unsigned m, double theta);
float sph_legendref(unsigned l, unsigned m, float theta);
long double sph_legendrel(unsigned l, unsigned m, long double theta);
// [5.2.1.23] spherical Neumann functions;
// spherical Bessel functions (of the second kind):
double sph_neumann(unsigned n, double x);
float sph_neumannf(unsigned n, float x);
long double sph_neumannl(unsigned n, long double x);
} // namespace tr1
} // namespace std

Стандартное соответствие:В версии Boost этого компонента не поддерживаются следующие функции:

// [5.2.1.7] confluent hypergeometric functions:
double conf_hyperg(double a, double c, double x);
float conf_hypergf(float a, float c, float x);
long double conf_hypergl(long double a, long double c, long double x);
// [5.2.1.17] hypergeometric functions:
double hyperg(double a, double b, double c, double x);
float hypergf(float a, float b, float c, float x);
long double hypergl(long double a, long double b, long double c, long double x);

TR добавляет ряд специальных функций, которые были впервые введены в стандарт C99 для заголовка.

Для получения дополнительной информации обратитесь кMath Library docs.

namespace std {
namespace tr1 {
   // types
   typedef floating-type double_t;
   typedef floating-type float_t;
   // functions
   double acosh(double x);
   float acoshf(float x);
   long double acoshl(long double x);
   double asinh(double x);
   float asinhf(float x);
   long double asinhl(long double x);
   double atanh(double x);
   float atanhf(float x);
   long double atanhl(long double x);
   double cbrt(double x);
   float cbrtf(float x);
   long double cbrtl(long double x);
   double copysign(double x, double y);
   float copysignf(float x, float y);
   long double copysignl(long double x, long double y);
   double erf(double x);
   float erff(float x);
   long double erfl(long double x);
   double erfc(double x);
   float erfcf(float x);
   long double erfcl(long double x);
   double exp2(double x);
   float exp2f(float x);
   long double exp2l(long double x);
   double expm1(double x);
   float expm1f(float x);
   long double expm1l(long double x);
   double fdim(double x, double y);
   float fdimf(float x, float y);
   long double fdiml(long double x, long double y);
   double fma(double x, double y, double z);
   float fmaf(float x, float y, float z);
   long double fmal(long double x, long double y, long double z);
   double fmax(double x, double y);
   float fmaxf(float x, float y);
   long double fmaxl(long double x, long double y);
   double fmin(double x, double y);
   float fminf(float x, float y);
   long double fminl(long double x, long double y);
   double hypot(double x, double y);
   float hypotf(float x, float y);
   long double hypotl(long double x, long double y);
   int ilogb(double x);
   int ilogbf(float x);
   int ilogbl(long double x);
   double lgamma(double x);
   float lgammaf(float x);
   long double lgammal(long double x);
   long long llrint(double x);
   long long llrintf(float x);
   long long llrintl(long double x);
   long long llround(double x);
   long long llroundf(float x);
   long long llroundl(long double x);
   double log1p(double x);
   float log1pf(float x);
   long double log1pl(long double x);
   double log2(double x);
   float log2f(float x);
   long double log2l(long double x);
   double logb(double x);
   float logbf(float x);
   long double logbl(long double x);
   long lrint(double x);
   long lrintf(float x);
   long lrintl(long double x);
   long lround(double x);
   long lroundf(float x);
   long lroundl(long double x);
   double nan(const char *str);
   float nanf(const char *str);
   long double nanl(const char *str);
   double nearbyint(double x);
   float nearbyintf(float x);
   long double nearbyintl(long double x);
   double nextafter(double x, double y);
   float nextafterf(float x, float y);
   long double nextafterl(long double x, long double y);
   double nexttoward(double x, long double y);
   float nexttowardf(float x, long double y);
   long double nexttowardl(long double x, long double y);
   double remainder(double x, double y);
   float remainderf(float x, float y);
   long double remainderl(long double x, long double y);
   double remquo(double x, double y, int *pquo);
   float remquof(float x, float y, int *pquo);
   long double remquol(long double x, long double y, int *pquo);
   double rint(double x);
   float rintf(float x);
   long double rintl(long double x);
   double round(double x);
   float roundf(float x);
   long double roundl(long double x);
   double scalbln(double x, long ex);
   float scalblnf(float x, long ex);
   long double scalblnl(long double x, long ex);
   double scalbn(double x, int ex);
   float scalbnf(float x, int ex);
   long double scalbnl(long double x, int ex);
   double tgamma(double x);
   float tgammaf(float x);
   long double tgammal(long double x);
   double trunc(double x);
   float truncf(float x);
   long double truncl(long double x);
   // C99 macros defined as C++ templates
   template<class T> bool signbit(T x);
   template<class T> int fpclassify(T x);
   template<class T> bool isfinite(T x);
   template<class T> bool isinf(T x);
   template<class T> bool isnan(T x);
   template<class T> bool isnormal(T x);
   template<class T> bool isgreater(T x, T y);
   template<class T> bool isgreaterequal(T x, T y);
   template<class T> bool isless(T x, T y);
   template<class T> bool islessequal(T x, T y);
   template<class T> bool islessgreater(T x, T y);
   template<class T> bool isunordered(T x, T y);
}} // namespaces

Стандартное соответствие:В версии Boost этого компонента не поддерживаются следующие функции:

double exp2(double x);
float exp2f(float x);
long double exp2l(long double x);
double fdim(double x, double y);
float fdimf(float x, float y);
long double fdiml(long double x, long double y);
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
long double fmal(long double x, long double y, long double z);
int ilogb(double x);
int ilogbf(float x);
int ilogbl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);
double log2(double x);
float log2f(float x);
long double log2l(long double x);
double logb(double x);
float logbf(float x);
long double logbl(long double x);
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
double nan(const char *str);
float nanf(const char *str);
long double nanl(const char *str);
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double remainder(double x, double y);
float remainderf(float x, float y);
long double remainderl(long double x, long double y);
double remquo(double x, double y, int *pquo);
float remquof(float x, float y, int *pquo);
long double remquol(long double x, long double y, int *pquo);
double rint(double x);
float rintf(float x);
long double rintl(long double x);
double scalbln(double x, long ex);
float scalblnf(float x, long ex);
long double scalblnl(long double x, long ex);
double scalbn(double x, int ex);
float scalbnf(float x, int ex);
long double scalbnl(long double x, int ex);
// C99 macros defined as C++ templates
template<class T> bool isgreater(T x, T y);
template<class T> bool isgreaterequal(T x, T y);
template<class T> bool isless(T x, T y);
template<class T> bool islessequal(T x, T y);
template<class T> bool islessgreater(T x, T y);
template<class T> bool isunordered(T x, T y);

PrevUpHomeNext

Статья TR1 By Subject раздела The Boost C++ Libraries BoostBook Documentation Subset Chapter 36. Boost.TR1 может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Chapter 36. Boost.TR1 ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 17:34:59/0.043461799621582/1