Изменения

Перейти к: навигация, поиск

Участник:Yulya3102/Плюсы2сем

648 байт добавлено, 23:39, 9 марта 2013
перегрузка операторов, ADL
=== namespace'ы, using declaration ===
=== using directive ===
using namespace stdnamespace_name;Делает все объекты из std namespace_name доступными в текущем scope  namespace a { int v; } namespace b { int v; } И два случая: { using a::v; using namespace b; // ошибки нет } { using a::v; using b::v; // ошибка из-за повторного объявления } 
=== namespace aliases ===
We can declare alternate names for existing namespaces according to the following format:
=== перегрузка операторов, ADL ===
In the C++ programming language, argument-dependent lookup (ADL), or argument-dependent name lookup, applies to the lookup of an unqualified function name depending on the types of the arguments given to the function call.
namespace NS
{
class A {};
void f( A *&, int ) {}
}
int main()
{
NS::A *a;
f( a, 0 ); //calls NS::f
}
 
=== зачем нужны шаблоны ===
=== базовое представление о шаблонах ===
355
правок

Навигация