We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3080a9a commit ccdf818Copy full SHA for ccdf818
1 file changed
examples/construction.cpp
@@ -29,8 +29,10 @@ int main()
29
std::cout << " Equals numeric_limits max? " << std::boolalpha
30
<< (max_value == std::numeric_limits<uint128_t>::max()) << std::endl;
31
32
- // 3) From user-defined literals. Values that fit in unsigned long long
33
- // can be written directly without quotes:
+ // 3) From user-defined literals.
+ // The library provides only string-form UDLs
34
+ // For small values like this a string is still parsed rather than direct construction
35
+ // Using the constructors for values that fit in (unsigned) long long should be preferred for performance
36
using namespace boost::int128::literals;
37
const auto small_literal {12345_U128};
38
std::cout << "From literal 12345_U128: " << small_literal << std::endl;
0 commit comments