cpp/numeric/ratio/ratio less: Unterschied zwischen den Versionen
Aus cppreference.com
P12 (Diskussion | Beiträge) K (1 Version: Translate from the English version) |
P12bot (Diskussion | Beiträge) K (Use {{lc}}. Update links. Various fixes.) |
||
(Eine dazwischenliegende Version von einem Benutzer wird nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
{{cpp/title | ratio_less}} | {{cpp/title | ratio_less}} | ||
{{cpp/numeric/ratio/navbar}} | {{cpp/numeric/ratio/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{header | ratio}} |
− | {{ | + | {{| 1= |
template< class R1, class R2 > | template< class R1, class R2 > | ||
struct ratio_less : std::integral_constant; | struct ratio_less : std::integral_constant; | ||
}} | }} | ||
− | {{ | + | {{end}} |
{{tr|Wenn das Verhältnis R1 kleiner ist als das Verhältnis R2 stellt die Elementkonstante {{tt|value}} gleich {{c|true}}. Ansonsten ist {{tt|value}} {{c|false}} .|If the ratio R1 is less than the ratio R2, provides the member constant {{tt|value}} equal {{c|true}}. Otherwise, {{tt|value}} is {{c|false}}.}} | {{tr|Wenn das Verhältnis R1 kleiner ist als das Verhältnis R2 stellt die Elementkonstante {{tt|value}} gleich {{c|true}}. Ansonsten ist {{tt|value}} {{c|false}} .|If the ratio R1 is less than the ratio R2, provides the member constant {{tt|value}} equal {{c|true}}. Otherwise, {{tt|value}} is {{c|false}}.}} | ||
Zeile 30: | Zeile 30: | ||
23/37 < 57/90 | 23/37 < 57/90 | ||
}} | }} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |
Aktuelle Version vom 1. Juli 2013, 20:41 Uhr
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <ratio>
|
||
template< class R1, class R2 > struct ratio_less : std::integral_constant; |
||
Wenn das Verhältnis R1 kleiner ist als das Verhältnis R2 stellt die Elementkonstante
value
gleich true. Ansonsten ist value
false .Original:
If the ratio R1 is less than the ratio R2, provides the member constant
value
equal true. Otherwise, value
is false.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Inhaltsverzeichnis |
Inherited from std::integral_constant
Member constants
value [statisch] |
true wenn R1::num * R2::den < R2::num * R1::den, or equivalent expression that avoids overflow , false anders Original: true if R1::num * R2::den < R2::num * R1::den, or equivalent expression that avoids overflow , false otherwise The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public static Mitglied konstanten) |
Member functions
operator bool |
wandelt das Objekt bool, gibt value Original: converts the object to bool, returns value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) |
Member types
Type
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
value_type
|
bool
|
type
|
std::integral_constant<bool, value> |
[Bearbeiten] Beispiel
#include <iostream> #include <ratio> int main() { if (std::ratio_less<std::ratio<23,37>, std::ratio<57,90>>::value) { std::cout << "23/37 < 57/90\n"; } }
Output:
23/37 < 57/90