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

Copy Constructible

Boost , ,

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

Copy Constructible

Description

Тип является копируемым, если есть возможность копировать объекты этого типа.

Notation

T is type that is a model of Copy Constructible
t is an object of type T
u is an object of type const T

Definitions

Valid expressions

Name Expression Return type Semantics
Copy constructor T(t) T t is equivalent to T(t)
Copy constructor
T(u)
T u is equivalent to T(u)
Destructor
t.~T()
T  
Address Operator
&t
T* denotes the address of t
Address Operator
&u
T* denotes the address of u

Models

  • в
  • std::pair

Concept Checking Class

  template <class T>
  struct CopyConstructibleConcept
  {
    void constraints() {
      T a(b);            // require copy constructor
      T* ptr = &a;       // require address of operator
      const_constraints(a);
      ignore_unused_variable_warning(ptr);
    }
    void const_constraints(const T& a) {
      T c(a);            // require const copy constructor
      const T* ptr = &a; // require const address of operator
      ignore_unused_variable_warning(c);
      ignore_unused_variable_warning(ptr);
    }
    T b;
  };

See also

Конструктивный по умолчаниюиПрименимо


Valid HTML 4.01 Transitional

Пересмотрено05 декабря 2006 года05 December, 2006[ORIG_END] -->

Copyright © 2000 Джереми Сик, Univ.of Notre Damejsiek@lsc.nd.edu

Распространяется в соответствии с лицензией Boost Software License, Version 1.0. (См. сопроводительный файлLICENSE_1_0.txtили копию на) http://www.boost.org/LICENSE_1_0.txt

Статья Copy Constructible раздела может быть полезна для разработчиков на c++ и boost.




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



:: Главная :: ::


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 20:01:11/0.007951021194458/1