Skip to content

Commit ccdf818

Browse files
committed
Update comment on construction
1 parent 3080a9a commit ccdf818

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/construction.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ int main()
2929
std::cout << " Equals numeric_limits max? " << std::boolalpha
3030
<< (max_value == std::numeric_limits<uint128_t>::max()) << std::endl;
3131

32-
// 3) From user-defined literals. Values that fit in unsigned long long
33-
// can be written directly without quotes:
32+
// 3) From user-defined literals.
33+
// 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
3436
using namespace boost::int128::literals;
3537
const auto small_literal {12345_U128};
3638
std::cout << "From literal 12345_U128: " << small_literal << std::endl;

0 commit comments

Comments
 (0)