Releases: robhz786/strf
v0.16.1
v0.16.0
-
Breaking changes
-
Changed how printable types are to be added
-
Redesigned transcoding API
-
removed
surrogate_policy
facet -
width_decumulator
is now default constructed withremaining_width() == width_max
-
remove copy-constructor from
array_destination
-
printing of integers is not overridable anymore
-
added template parameter to printable_overrider_c
-
Renamed/replaced
-
In PrintingTraits:
formatters
->format_specifiers
- suffix
_formatter
to_format_specifiers
in all names
- suffix
-
Named type requirements Formatters to FormatSpecifier
-
conv
->transcode
-
value_with_formatters -> value_and_format
-
codepoints_robust_count
->count_codepoints
-
codepoints_robust_count_f
->count_codepoints_f
-
codepoints_fast_count
->count_codepoints_fast
-
codepoints_fast_count_f
->codepoints_fast_count_f
-
codepoints_count_result
->count_codepoints_result<CharT>
-
width_and_pos
->width_and_ptr<CharT>
-
min_space_after_recycle
tomin_destination_buffer_size
-
basic_cstr_writer
tobasic_cstr_destination
-
basic_char_array_writer
toarray_destination
-
discarded_destination
todiscarder
-
type requirement
PrintTraits
->PrintableDef
- and its member type
formatters
->format_specifiers
- and its member function template
make_printer_input
->PrintTraits::make_input
- and its member type
-
removed type requirement
PrinterInput
-
struct template
print_traits
->printer
, andprint_traits_of
->printer_of
print_traits_tag
->printable_tag
-
function template
preview
toprecalculate
-
class templates
print_preview
topremeasurements
size_preview
tosize_accumulator
width_preview
towidth_accumulator
( and redesigned )
-
type alias
print_size_and_width_preview
tofull_premeasurements
-
enumerations
preview_size
toprecalc_size
preview_width
toprecalc_width
-
Replace class templates
destination_no_reserve
,
destination_calc_size
anddestination_with_given_size
byprinting_syntax
-
Change Transcode requirements
- change parameters order in
transcode
- add
unsafe_transcode
andunsafe_transcode_size
- rename member type aliases:
src_char_type
->src_code_unit
dst_char_type
->dst_code_unit
- change parameters order in
-
-
Redesigned
destination
:destination<CharT>
now is a type alias tooutput_buffer<CharT, 64>
, whereoutput_buffer<CharT, N>
derives fromoutput_buffer<CharT, N - 1>
and the poscondition ofoutput_buffer<CharT, N>::recycle_buffer()
is thatspace() >= (1 >> N)
- Renamed tepe membes
char_type
tovalue_type
- Removed deprecated function
size
-
Removed deprecated type aliases:
basic_outbuff
,bin_outbuff
,u8outbuff
,u16outbuff
,u32outbuff
,woutbuff
-
Removed deprecated class template
width_by_func
( and function templatemake_width_calculator
) -
Replaced facet
invalid_seq_notifer
bytranscoding_error_notifer
-
When transcoding U+FFFD, just translate it to the replacement character of the destination encoding ( don't call trascoding_error_notifier::unsupported_codepoint anymore )
-
Replacing unsigned integers with signed everywhere. Including:
- signature of virtual function output_buffer::do_write
- signature of charset functions
-
v0.15.3
v0.15.2
-
Rename class template
basic_outbuff
todestination
And its member functions:
pointer()
->buffer_ptr()
end()
->buffer_end()
space()
->buffer_space()
But create aliases with the old names to preserve backward compatibility -
Fix bugs in floating-point printing:
- segfault when printing in fixed notation with precision a value
that is to close to zero ( likestrf::fixed(1e-30, 3)
) - wrong aligment when printing
strf::gen(120.1, 3) > 10
- segfault when printing in fixed notation with precision a value
-
Fix some mistakes in CMakeLists.txt:
- target
strf-cuda
was equivalent tostrf-header-only
- make exported package relocatable
- target
v0.15.1
V0.15.0
Breaking changes:
- Now you need to invoke
punct
format function if you want to apply numeric punctuation - Made
width_t
unsigned - Modified
width_t::round()
: now it rounds towards zero on ties ( instead of towards even number ). - Removed class template
basic_outbuff_noexcept
. - Added template parameter to narrow_cfile_writer to specify buffer's size.
- Renamed
strf::get_facet
tostrf::use_facet
- Renamed
outbuff_garbage_buf
togarbage_buff
- Renamed "Char econding" to "charset":
char_encoding
tocharset
andchar_encoding_id
tocharset_eid
eid_*
toscid_*
static_char_encoding
tostatic_charset
dynamic_char_encoding_data
todynamic_charset_data
dynamic_char_encoding
todynamic_charset
char_encoding_c
tocharset_c
convert_encoding
to convert_charset`convert_from_encoding
to convert_from_charset`sanitize_encoding to sanitize_charset
sanitize_from_encoding to sanitize_from_charset
get_encoding
toget_charset
- CharEncoding to Charset ( type requirement )
- Charset::char_type to Charset::code_unit
- Charset::decode_char to Charset::decode_unit
- Renamed charset and width calculation facets: Added the "_t" suffix, and created a constexpr variable, or a variable template, with each of the previous names. For example:
- Charsets: The types
utf<CharT>
,utf8<CharT>
,strf::iso_8859_6<CharT>
, etc were renamed toutf_t<CharT>
,utf8_t<CharT>
,strf::iso_8859_6_t<CharT>
, etc. The old names (utf<CharT>
,utf8<CharT>
, etc ) are now constexpr values. - Width calculators: The types
fast_width
,width_as_fast_u32len
, andwidth_as_u32len
were renamed tofast_width_t
,width_as_fast_u32len_t
andwidth_as_u32len_t
respectively. The old names are now constexpr values. - Change the default facet of
width_calculator_c
towidth_as_u32len_t
. - Modified In PrintTraits::make_printer_input signature: added
tag<CharT>
parameter.
- Charsets: The types
Improvements:
- Add support to all ISO-8859-x and Windows-125x character encodings.
- Create
char_array_writer
andto_range
( that writes tochar*
without appending '\0' )
Bug fixes:
- Fix 32bit floating point in hexadecimal ( it was totally wrong )
- Transcoding from UTF-16 to UTF-8 ac49b9e
- UTF-8 decoding big codepoints fac0db3
Others things:
- Create
write
and anddo_write
member functions in basic_outbuff - Moved benchmarks to another git repository
- Removed git submodules
v0.14.0
-
Breaking changes:
- Removed split (a.k.a. internal ) alignment formatting. The following items have been removed:
text_alignment::split
- format function
operator%
join_split
- Renamed:
alignment_formatter
->dynamic_alignment_formatter
empty_alignment_formatter
->alignment_formatter
- Removed template parameter from
float_formatter
. Now there is instead afloat_notation
member variable infloat_format
.
- Removed split (a.k.a. internal ) alignment formatting. The following items have been removed:
-
New features
- Format function
pad0
( similar toprintf
format flat'0'
) - Format function
fill_sign
( can also useoperator~
). ( similar toprintf
format flat' '
)
- Format function
-
Little improvements:
- PrintTraits is more flexible now: If
PrintTraits::make_printer_input<CharT>(p,facets,x)
is ill-formed, thenPrintTraits::make_printer_input<CharT>(p,facets,fmt(x))
is used instead. This reduces boilter-plate code when you extend the library ( add a new printable type )
- PrintTraits is more flexible now: If
v0.13.1
v0.13.0
-
New features
- New printable type: char32_t
- Created
strf::preview
function template.
-
Breaking changes:
- In
basic_outbuff
, renamedsize
tospace
- In class template
size_preview
, renamedget_size
toaccumulated_size
. - In class template
width_preview
, changed behaviour ofsubtract_width
and removedchecked_subtract_width
. - Modified PrintTraits type requirements.
- In
usual_printer_input
, renamefp
tofacets
. - Modified float_format_fn, int_format_fn, alignemnt_format_fn
- Redesigned class
digits_group_iterator
- Bug #19 - Now the argument passed to
fill
must be of a character type - Bug #28 - Now
*oct(0)
is printed as "0", not "00" - Now format function operator* and operator+ when applied to integers
when the numeric base is not correct. - Removed deprecated format function
operator~
( replaced byoperator*
)
- In
-
Enhance documenation:
- Created "How to add destinations"
- Created "How to add printable types"
- Created "How to override printable types"
- Document
numpunct
facet in strf_hpp.html