Further, the keyword decltype can be used to determine the type of expression at compile-time.
Dodatkowo, słowo kluczowe decltype może być zastosowane w celu określenia typu w czasie kompilacji.
However, decltype can also be very useful for expressions in code that makes heavy use of operator overloading and specialized types.
Jednak decltype może być także bardzo przydatny w takich wyrażeniach w kodzie, które intensywnie używają przeciążonych operatorów i typów specjalizowanych.
The compiler crashes with the "decltype(*this)" type specifier.
Kompilator ulega awarii specyfikatora typu "decltype(*this)".
To emphasize that the deduced type would reflect the "declared type" of the expression, the operator was proposed to be named decltype.
Aby podkreślić, że dedukowany typ pochodzi od "deklarowanego typu" wyrażenia, nazwa zaproponowanego operatora to decltype.
Microsoft's Visual C++ 2010 compiler provides a decltype operator that closely mimics the semantics as described in the standards committee proposal.
Kompilator Microsoft Visual C++ 2010 dostarcza operator decltype, który dość wiernie naśladuje specyfikację opisaną we wniosku do komitetu standaryzującego.
This, and similar issues pertaining to the wording inhibiting the use of decltype in the declaration of a derived class and in a destructor call, were addressed by David Vandevoorde, and voted into the working paper in March 2010.
Te i podobne kwestie odnoszące się do treści wstrzymującej stosowalność decltype w deklaracji klasy potomnej i w wywołaniu destruktora, zostały zaadresowane i zagłosowane przez Davida Vandevoorde'a w dokumencie roboczym z marca 2010.
In December 2008, a concern was raised to the committee by Jaakko Järvi over the inability to use decltype to form a qualified-id, which is inconsistent with the intent that decltype(e) should be treated "as if it were a typedef-name".
W grudniu 2008 Jaakko Järvi zgłosił problem do komisji, że decltype nie można zastosować do utworzenia qualified-id[b], co jest niespójne z intencją, że decltype powinien być traktowany tak jakby był typedef-name[c].
One of the cited main motivations for the decltype proposal, was the ability to write perfect forwarding function templates.
Jednym z najczęściej cytowanych motywów wprowadzenia proponowanego operatora decltype była możliwość zapisu w szablonach idealnych funkcji przekierowujących.
Conteúdo potencialmente sensível ou impróprio
Os exemplos servem apenas como ajuda na tradução da palavra ou da expressão procurada. Eles não são selecionados ou validados por nós e podem conter linguagem inapropriada. Pedimos que reporte exemplos que devem ser modificados ou que não devem ser exibidos. As traduções potencialmente sensivéis, impróprias ou coloquiais geralmente são marcadas em vermelho ou em laranja.