Alexander Grund
acefe4358c
Disable C++11 features for libstdc++ <5
2020-02-28 19:44:59 +01:00
Alexander Grund
f00cafb095
Use boost-ci for travis, codecov, coverity
2020-02-28 19:35:40 +01:00
Alexander Grund
1efba9eec7
Add C++11 move ctor and assignment and swap functions
2020-02-28 19:35:38 +01:00
Alexander Grund
959d3d0146
Merge pull request #71 from Flamefire/fix_CI_and_bugs
...
Fix CI and bugs detected
2020-02-25 23:08:54 +01:00
Alexander Grund
3ff83bdc27
Use wchar_t overloads and custom filebuf also on cygwin
...
boost::filesystem::path uses wchar_t* on cygwin and cygwins std::filesystem::path may use it too
2020-02-25 19:47:51 +01:00
Alexander Grund
0804214f92
[Test] Fix tests for stackstring
...
Values that should go onto stack were put on heap invalidating some tests
2020-02-25 15:00:49 +01:00
Alexander Grund
6ae2d8aa9b
Fix crash on assignment of empty stackstring
...
Also add this as a testcase
2020-02-25 15:00:49 +01:00
Alexander Grund
b171658b0a
[Test] Improve test_stackstring
...
Show some progress
Test using stackstring in a vector
2020-02-25 15:00:49 +01:00
Alexander Grund
5d5bcae847
Use standard-compliant operations of std::ios_base::openmode
2020-02-25 15:00:49 +01:00
Alexander Grund
9e2d028864
Remove 'return' from void-returning open()
2020-02-25 15:00:49 +01:00
Alexander Grund
3e391eac15
Rename BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS to BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT
2020-02-25 15:00:49 +01:00
Alexander Grund
c792d00d02
[CI] Test shared and static builds through b2
2020-02-25 15:00:49 +01:00
Alexander Grund
a54481131d
Fix build on MinGW/Cygwin when -std=c++nn is passed
...
That flag forces ISO conformance removing the declarations of the
required _w* functions.
Move the implementations using those into source files and undef
__STRICT_ANSI__ inside that file
Also allows to not use the *_s functions on MSVC as
_CRT_SECURE_NO_WARNINGS can be safely define inside the cpp files.
2020-02-25 15:00:36 +01:00
Alexander Grund
7474cb8b4a
Avoid CRT_SECURE_WARNINGS on clang-win
2020-02-24 18:00:48 +01:00
Alexander Grund
777ed33ad0
[Test] Improve fstream tests
...
- Add test for gcount after get/putback
- Remove "sanity" checks using std streams
- Avoid the need to test the superset of functionality and focus on
what Boost.Nowide (should) provide
- Also avoids compiler quirks (e.g. MSVC or libstdc++ behavior on putback)
2020-02-24 14:32:25 +01:00
Alexander Grund
6913461103
[CI] Disable fast-finish on appveyor
2020-02-24 13:31:57 +01:00
Alexander Grund
4cbfd4be41
[Test] Avoid message boxes on assertion failures
2020-02-24 13:31:57 +01:00
Alexander Grund
2dbe4552c3
Don't use map.at for C++98 compatibility
2020-02-24 13:31:57 +01:00
Alexander Grund
06320f5dba
Fix 'inherits via dominance' warning (again)
2020-02-24 13:31:57 +01:00
Alexander Grund
7183210928
Use buf_ directly instead of rdbuf
...
Avoids warning about usage of member functions on instances not
fully constructed yet
2020-02-24 13:31:57 +01:00
Alexander Grund
9a12cb560b
[Test] Prevent abort on freopen(NULL on MSVC
2020-02-22 23:31:41 +01:00
Alexander Grund
7e75be04b5
[Test] Add some output to test_stdio
2020-02-22 15:51:14 +01:00
Alexander Grund
d3fc524943
[Test] Avoid C4127 (constant expression detected in test macro)
2020-02-22 15:51:14 +01:00
Alexander Grund
35e98fad2f
[CI] Fix Jamfile
2020-02-22 15:51:11 +01:00
Alexander Grund
0d2d0aaa39
Merge pull request #70 from Flamefire/cmake_install
...
Add VERSION_COMPATIBILITY and use INCLUDES DESTINATION
2020-02-20 20:02:11 +01:00
Alexander Grund
15ff63f950
Add VERSION_COMPATIBILITY and use INCLUDES DESTINATION
2020-02-20 19:54:34 +01:00
Alexander Grund
6a0df7ed38
Merge pull request #69 from Flamefire/fix_filebuf_usage
...
Fix filebuf usage
2020-02-19 15:59:13 +01:00
Alexander Grund
c9993e22cb
Remove CRTP
...
Only the types are needed, not the whole class which shortens template names
2020-02-19 14:33:48 +01:00
Alexander Grund
f273eadffe
Fix usage of wrong filebuf
2020-02-19 14:26:54 +01:00
Alexander Grund
c8e387ab8b
Merge pull request #67 from boostorg/return_old_locale
...
Return old locale from nowide_filesystem
2020-02-19 14:19:44 +01:00
Alexander Grund
636c813b1a
[CI] Don't fail if build dir can't be removed
2020-02-10 19:12:44 +01:00
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