2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-22 03:22:32 +00:00
Commit Graph

216 Commits

Author SHA1 Message Date
Alexander Grund
baf19dc56c Return old locale from nowide_filesystem 2020-02-10 18:13:39 +01:00
Alexander Grund
514d027ba7 Merge pull request #66 from Flamefire/char_count_conv
Allow passing string length to widen/narrow
2020-02-10 18:13:00 +01:00
Alexander Grund
c1ab1b587e [CI] Don't use Boosts CMakeConfig to be able to find custom version 2020-02-10 17:31:12 +01:00
Alexander Grund
4054fee993 [CI] Workaround for "Device or resource busy" error 2020-02-10 17:27:18 +01:00
Alexander Grund
266bd356c7 [CI] Use cached boost 2020-02-10 17:27:14 +01:00
Alexander Grund
53809122df Allow passing string length to widen/narrow
This allows to use non-NULL-terminated strings as input
Also update the docs
2020-02-10 15:05:24 +01:00
Alexander Grund
55dc10964d Merge pull request #65 from Flamefire/fix_perf
Fix degraded performance in filebuf
2020-02-06 18:10:37 +01:00
Alexander Grund
228699f2dd Use BUFSIZ for the filebuf buffer size
Improves performance greatly
Fixes #31
2020-02-06 16:57:09 +01:00
Alexander Grund
3ff3002a22 Improve performance test
Run multiple times and take mean speed
Present results in a table for easier comparison
Add some tricks to avoid optimization reordering stuff that breaks the benchmark
2020-02-06 16:57:09 +01:00
Alexander Grund
6e88783a2d Merge pull request #26 from Flamefire/widestringSupport
Windows: Support filesystem::path in fstream
2020-02-05 17:19:55 +01:00
Alexander Grund
98b2a398bf Test for std::string ctor/open on all platforms 2020-02-05 13:07:24 +01:00
Alexander Grund
05a46ea895 Fix docu for console IO 2020-02-04 19:06:08 +01:00
Alexander Grund
b0cd74aa40 Add documention of path and string support for classes of fstream.hpp 2020-02-04 19:04:08 +01:00
Alexander Grund
ad77653f51 Avoid casting to super class during ctor run
It is undefined behavior to cast to a type for which the constructor did
not finish yet. So make the impl class inherit from the std class as all
calls for which a cast to the super class were required are actually to
the std class.
This allows moving the initialization of the std class to the impl
further reducing duplicate code.
2020-02-04 19:04:08 +01:00
Alexander Grund
dbac66606d Add support for *::filesystem::path to fstream classes 2020-02-04 19:04:07 +01:00
Alexander Grund
777d8c702f Reduce boilerplate from basic_*fstream classes
Add a subclass which initializes basic_filebuf so it can be passed to the stream constructor
Move functions into this subclass using template params for the default arguments and modifiers
2020-02-04 19:04:07 +01:00
Alexander Grund
d3b49dd589 Also test string ctor of fstream classes when replacements are used
I.e. BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS is defined
2020-02-04 19:04:07 +01:00
Alexander Grund
a4860d6ee9 Merge pull request #64 from Flamefire/max_line_length
Reduce max line length to 120
2020-02-04 18:54:50 +01:00
Alexander Grund
8e08054b42 Reduce max line length to 120 2020-02-04 17:46:48 +01:00
Alexander Grund
1f348cb2e1 Merge pull request #63 from Flamefire/simplify_cmake
Simplify cmake
2020-01-28 14:43:14 +01:00
Alexander Grund
22d0d00f70 Build Boost on Github CI
Avoid dependency on some unknown version
2020-01-24 13:04:58 +01:00
Alexander Grund
20b04415f0 Remove usage of BOOST_GCC_VERSION
We only check for the major version which is simpler this way
2020-01-24 10:24:26 +01:00
Alexander Grund
848ba5366f Merge pull request #61 from Flamefire/simplify_convert
Move basic_convert to detail namespace and rename
2020-01-24 10:20:07 +01:00
Alexander Grund
de93336895 Simplify CMake
Remove LAYOUT and SYSTEM_INCLUDE parameters (handled by superproject if wanted).
Remove BoostAddLibrary and add the options in the "classic" way.
Refactor BoostInstall into a generic InstallTargets function that wraps
all boilerplate code required for almost all libraries.
2020-01-21 17:33:49 +01:00
Alexander Grund
470faf1f92 Move basic_convert to detail namespace and rename
The new names convey what the result will be.
Also remove helper functions to reduce number of variations.
2020-01-09 15:16:46 +01:00
Alexander Grund
fdad59cf61 Merge pull request #60 from Flamefire/fix_codecvt
Fix codecvt and improve conversion tests
2020-01-09 13:10:00 +01:00
Alexander Grund
14675cd822 Fix utf8_codecvt conversion of UTF-16 string with trailing surrogate
The correct result is `partial`, not `ok`
2020-01-08 17:24:46 +01:00
Alexander Grund
bf8b679555 Improve conversion tests
- Move common test cases into test_sets
- Run test_sets with all variants of conversions
- Handle incomplete input in codecvt conversion test
2020-01-08 17:24:46 +01:00
Alexander Grund
0ecb87549b Merge pull request #59 from Flamefire/minor_improvements
Minor improvements
2020-01-08 17:24:27 +01:00
Alexander Grund
5bcafbcc3d Don't use reinterpret_cast
This is a strict-aliasing violation and hence UB
2020-01-08 16:55:50 +01:00
Alexander Grund
983acd5dc0 Document utf8_codecvt 2020-01-08 16:55:30 +01:00
Alexander Grund
999893c4e6 Remove unused u2w_tests array from test 2020-01-08 10:25:49 +01:00
Alexander Grund
7854435d8e Switch pointer alignment to left
Consistency with rest of boost
2020-01-07 21:27:26 +01:00
Alexander Grund
bb2487351f Use west-const
Almost all of boost does, so be nice stay consistent
2020-01-07 21:26:12 +01:00
Alexander Grund
b086175a4e Fix include guards 2020-01-07 21:07:35 +01:00
Alexander Grund
b19c25376c Rename namespace details -> detail
As per common convention
2020-01-07 21:05:18 +01:00
Alexander Grund
1168f607bb Remove vim format tags 2020-01-07 19:41:33 +01:00
Alexander Grund
afe7304f29 Use define instead of commandline switch for test_system 2020-01-07 19:41:33 +01:00
Alexander Grund
40d5757920 Fix typo in docu 2020-01-07 16:51:08 +01:00
Alexander Grund
17fbd803f4 Merge pull request #58 from Flamefire/static_analyzer
Fix issues found by static analyzer
2020-01-06 10:57:33 +01:00
Alexander Grund
ca2091a884 Add BOOST_NOWIDE_FALLTHROUGH for Boost < 1.64 2020-01-06 09:42:18 +01:00
Alexander Grund
920e60c6da Remove unused vectors in test_codecvt 2020-01-06 09:42:18 +01:00
Alexander Grund
74586edc53 Test and fix compile failure in is_open function 2020-01-06 09:42:18 +01:00
Alexander Grund
c8ad51877e Make class really uncopyable 2020-01-06 09:18:47 +01:00
Alexander Grund
3f59d86076 Merge pull request #57 from Flamefire/docu
Update docu
2020-01-05 20:17:00 +01:00
Flamefire
c4b6ef0c6a Update docu with suggestions from review 2020-01-05 17:08:52 +01:00
Flamefire
c780513153 Fix docu (typos & outdated) 2020-01-05 17:01:28 +01:00
Alexander Grund
fc700c30bb Merge pull request #56 from Flamefire/tie_streams
Fix potentially untied streams
2020-01-05 16:45:17 +01:00
Flamefire
7ab8bb4cba Compare != FALSE instead of == TRUE
The return value of the WinAPI is defined to be non-zero, but not required to be 1/TRUE
2020-01-05 16:29:18 +01:00
Flamefire
4955f32899 Fix potentially untied streams
When using LTCG/LTO the unused initializer might be optimized out.
Move the operation to the ctor
2020-01-05 16:25:40 +01:00