Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
d5893c9a
Commit
d5893c9a
authored
Jul 21, 2016
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update homepage and break long lines
parent
6ee9f2ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
27 deletions
+30
-27
doc/index.rst
doc/index.rst
+30
-27
No files found.
doc/index.rst
View file @
d5893c9a
...
...
@@ -10,9 +10,9 @@ alternative to C++ IOStreams.
<div class="panel panel-default">
<div class="panel-heading">What users say:</div>
<div class="panel-body">
Thanks for creating this library. It’s been a hole in C++ for a long
time.
I’ve used both boost::format and loki::SPrintf, and neither felt like the
right answer. This does.
Thanks for creating this library. It’s been a hole in C++ for a long
time. I’ve used both boost::format and loki::SPrintf, and neither felt
like the
right answer. This does.
</div>
</div>
...
...
@@ -98,8 +98,8 @@ literal operators, they must be made visible with the directive
Write API
---------
The concatenation-based Write API (experimental) provides a
`fast
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_
The concatenation-based Write API (experimental) provides a
`fast
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_
stateless alternative to IOStreams:
.. code:: c++
...
...
@@ -112,8 +112,9 @@ stateless alternative to IOStreams:
Safety
------
The library is fully type safe, automatic memory management prevents buffer overflow,
errors in format strings are reported using exceptions. For example, the code
The library is fully type safe, automatic memory management prevents buffer
overflow, errors in format strings are reported using exceptions. For example,
the code
.. code:: c++
...
...
@@ -138,19 +139,21 @@ formatted into a narrow string. You can use a wide format string instead:
fmt::format(L"Cyrillic letter {}", L'\x42e');
For comparison, writing a wide character to ``std::ostream`` results in
its numeric value being written to the stream (i.e. 1070 instead of letter 'ю' which
is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is needed.
its numeric value being written to the stream (i.e. 1070 instead of letter 'ю'
which is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is
needed.
.. _portability:
Portability
-----------
The library is highly portable. Here is an incomplete list of operating systems
and
compilers where it has been tested and known to work:
The library is highly portable. Here is an incomplete list of operating systems
and
compilers where it has been tested and known to work:
* 64-bit (amd64) GNU/Linux with GCC 4.4.3, `4.6.3 <https://travis-ci.org/fmtlib/fmt>`_,
4.7.2, 4.8.1 and Intel C++ Compiler (ICC) 14.0.2
* 64-bit (amd64) GNU/Linux with GCC 4.4.3,
`4.6.3 <https://travis-ci.org/fmtlib/fmt>`_, 4.7.2, 4.8.1, and Intel C++
Compiler (ICC) 14.0.2
* 32-bit (i386) GNU/Linux with GCC 4.4.3, 4.6.3
...
...
@@ -161,21 +164,21 @@ compilers where it has been tested and known to work:
* 32-bit Windows with Visual C++ 2010
Although the library uses C++11 features when available, it also works with
older
compilers and standard library implementations. The only thing to keep in mind
for C++98 portability:
Although the library uses C++11 features when available, it also works with
older compilers and standard library implementations. The only thing to keep in
mind
for C++98 portability:
* Variadic templates: minimum GCC 4.4, Clang 2.9 or VS2013. This feature allows
the Format API to accept an unlimited number of arguments. With older
compilers
the maximum is 15.
the Format API to accept an unlimited number of arguments. With older
compilers
the maximum is 15.
* User-defined literals: minimum GCC 4.7, Clang 3.1 or VS2015. The suffixes
``_format`` and ``_a`` are functionally equivalent to the functions
``fmt::format`` and ``fmt::arg``.
The output of all formatting functions is consistent across platforms. In
particular,
formatting a floating-point infinity always gives ``inf`` while the output
of ``printf`` is platform-dependent in this case. For example,
The output of all formatting functions is consistent across platforms. In
particular, formatting a floating-point infinity always gives ``inf`` while the
o
utput o
f ``printf`` is platform-dependent in this case. For example,
.. code::
...
...
@@ -188,10 +191,10 @@ always prints ``inf``.
Ease of Use
-----------
fmt has a small self-contained code base
consisting of a single header file
a
nd a single source file and no external dependencies. A permissive BSD `license
<https://github.com/fmtlib/fmt#license>`_ allows using the library both
in open-source and commercial projects.
fmt has a small self-contained code base
with the core library consisting of
a
single header file and a single source file and no external dependencies.
A permissive BSD `license <https://github.com/fmtlib/fmt#license>`_ allows
using the library both
in open-source and commercial projects.
.. raw:: html
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment