Commit Graph

1298 Commits

Author SHA1 Message Date
Crzyrndm
0aee6fd9b1 Cleanup some cmake modifications 2018-07-16 19:41:40 +12:00
Crzyrndm
ad759ae4f7 fix for build failure with GCC8{-std=c++17} 2018-07-16 19:08:19 +12:00
Crzyrndm
b9b47672ea cxx_std_14 and co aren't available until cmake v3.8 2018-07-16 18:52:21 +12:00
Crzyrndm
5671167d1d add cmake option XLNT_CXX_LANG to set the targetted cxx standard
- valid options are 11, 14, and 17
- default is 14
- cmake will error if an invalid value is provided
- requires cmake >= 3.10.* to take effect in visual studio
2018-07-15 21:23:22 +12:00
Crzyrndm
25d75cb5c3 complete the compiler set (gcc 6/7/8 + clang 4/5/6) 2018-07-14 21:27:54 +12:00
Crzyrndm
6b0fb72e78 make benchmarking conditional on other flags (static && release) 2018-07-14 21:13:57 +12:00
Crzyrndm
11573f45e6 Resolve remaining warnings 2018-07-14 20:25:10 +12:00
Crzyrndm
ea850b32d5 Add clang 4.0 to travis builds 2018-07-14 19:59:03 +12:00
Crzyrndm
9a33210144 Resolve warnings about global ctors and an unused variable
-- while unlikely to become an issue, ordering of ctors across source files is undefined and debugging issues related to it is not easy so just avoid that issue
2018-07-14 19:54:31 +12:00
Crzyrndm
d4cc538faf remove -Werror from clang build to allow CI to run through
-- fixing CI warnings 1 at a time would be a complete waste of time
-- blacklist some of the overkill warnings
2018-07-14 19:02:12 +12:00
Crzyrndm
c94fc5a999 Travis CI setup modifications 2018-07-14 18:35:48 +12:00
Crzyrndm
c0a90ccb7f
Merge pull request #307 from Crzyrndm/dev-test-suite-improvements
Test suite improvements
2018-07-13 11:56:55 +12:00
Crzyrndm
24b4b6c628 declaration/definition switched files
For some reason, the declaration was in the source file. Don't ask why, I don't know
2018-07-13 11:43:13 +12:00
Crzyrndm
54b1affd1e Merge remote-tracking branch 'upstream/dev' into dev-test-suite-improvements
# Conflicts:
#	tests/workbook/workbook_test_suite.cpp
2018-07-13 11:38:56 +12:00
Crzyrndm
b9fbe6241a
Merge pull request #306 from Crzyrndm/dev-Issue298
Resolution to Issue 298
2018-07-13 11:33:05 +12:00
Crzyrndm
1ab25fa7fc
Merge branch 'dev' into dev-Issue298 2018-07-13 11:21:13 +12:00
Crzyrndm
7160b7494d
Merge pull request #305 from Crzyrndm/dev-iterator-improvements-2
Remove uses of std::iterator (deprecated in C++17) + improvements
2018-07-13 11:14:19 +12:00
Crzyrndm
ed84fe50d2
Merge pull request #303 from sukoi26/dev
error what(): xl/sharedStrings.xml: error: duplicate attribute #290
2018-07-13 11:04:21 +12:00
sukoi26
28a71572cf
update #290
suggested by  Crzyrndm
2018-07-10 09:32:34 +02:00
Crzyrndm
399b5e3775 Resolve CI build failure 2018-07-10 14:43:22 +12:00
Crzyrndm
cffb1ce345 restart CI 2018-07-10 14:12:26 +12:00
Crzyrndm
0e69ea95bf fix build errors, fix warning about pragma once in source file 2018-07-10 13:43:16 +12:00
Crzyrndm
bf5105f0a3 fix static initialisation order issues causing the tests vector to get reset 2018-07-10 13:37:34 +12:00
Crzyrndm
d603ee2106 Merge pull request #1 from Crzyrndm/dev-iterator-improvements
Dev: iterator improvements
2018-07-10 12:41:02 +12:00
Crzyrndm
4afc0963c6 add post (in/de)crement tests 2018-07-10 12:41:00 +12:00
Crzyrndm
9a82c4fab7 Comment fixes and clarifications 2018-07-10 12:40:58 +12:00
Crzyrndm
b95919323d add more tests for worksheet iterator, add operator--
* operator-- completes the naive bidirectional iterator requirements
* tests for various construction and assignment behaviours
* tests for iteration and dereferencing behaviours
2018-07-10 12:40:56 +12:00
Crzyrndm
04b50d9b8e worksheet_iterator - operator* const overloads
Users may still want to dereference a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:54 +12:00
Crzyrndm
a47985b2db worksheet_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy ctor to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor

Changed workbook reference to a pointer to allow tests to compile (reference isn't rebindable so defaulted assignment is equivalent to deleted)
2018-07-10 12:40:52 +12:00
Crzyrndm
eaf3c2a773 Remove double definition 2018-07-10 12:40:50 +12:00
Crzyrndm
62e0a7dd17 Revert "cell iterator - add operator->"
This reverts commit 1b705ae043ae1b43d0ecbc93da04c944383bb296.
2018-07-10 12:40:48 +12:00
Crzyrndm
bc8cd21d67 range_iterator - operator* const overloads
Users may still want to dereference a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:46 +12:00
Crzyrndm
1e66824af0 range_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy ctor to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor
2018-07-10 12:40:44 +12:00
Crzyrndm
dc020622c0 cell iterator - move parameters aren't const
copy/paste error
2018-07-10 12:40:42 +12:00
Crzyrndm
1c4f9c7ed2 cell iterator - add operator->
Implementation just forwards to operator*, but this is a typical operator in the iterator API and is suprising and inconvenient that it is not present
2018-07-10 12:40:40 +12:00
Crzyrndm
20e72d69e5 cell_iterator - operator* const overloads
Users may still want to derederence a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:38 +12:00
Crzyrndm
92ac3a2a2e cell_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor
2018-07-10 12:40:36 +12:00
Joshua
744dd0afbb Remove uses of std::iterator (deprecated in C++17)
Detailed reasoning for the deprecation is provided by the paper proposing deprecation (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html) and a related LWG issue (https://cplusplus.github.io/LWG/issue2438).

This was the only issue preventing a clean compile with VS 15.7.2 with c++17/c++latest set as the target language

The issue could be resolved in two ways. Providing a custom replacement to std::iterator (a very simple structure) or by providing the 5 required typedefs. The only functional difference from my reading is that the typedefs are not immediately available to the implementer with the inheritance. I find the inline typedefs to be clearer hence the selection in this commit
2018-07-10 12:40:34 +12:00
sukoi26
99f20a014a
error what(): xl/sharedStrings.xml: error: duplicate attribute #290 2018-07-09 18:21:01 +02:00
Thomas Fussell
e1e4823908
Merge pull request #294 from Crzyrndm/dev-worksheet-test-failures
Fix all round-tripping test failures and UTF encoding test failures
2018-07-07 09:07:50 -04:00
Crzyrndm
51545734e8 Cleanup and remove <xlnt/xlnt.hpp> 2018-07-05 21:26:29 +12:00
Crzyrndm
03a56d8af9 Change all test headers to source files with related modifications
Issue #299
2018-07-05 20:47:24 +12:00
Crzyrndm
a7b167032b Modifications to test suite to support test auto-registration
Issue #299
2018-07-05 20:46:32 +12:00
Crzyrndm
a8fa6637fe fix workbook::operator== always returning false, add tests for workbook::load
workbook::operator== was comparing the value of the raw pointer held by two std::unique_ptr's. By definition, this is always false in a well behaved program (if it's true, things go bang...). This then led to adding equality operators to nearly every other struct/class in xlnt to support workbook::operator==

workbook::load and the non-default ctors for loading data from a file are tested using the now functional equality operator

NOTE: a large number of copy ctors need updates/fixing. Many should be defaulted
2018-07-03 14:05:07 +12:00
Crzyrndm
4eecf84713 add simple test for cell::column_index 2018-07-03 13:16:33 +12:00
Crzyrndm
688c8c7f33 add column_index to cell to be consistent with cell_reference
Issue #298
The consistency argument is a good one in my opinion
2018-07-03 11:10:47 +12:00
Crzyrndm
fb195e2777 fix accidentally copied ctor declaration 2018-07-03 11:09:33 +12:00
Crzyrndm
bb04205dac workbook parameterised constructors
Issue #298
- all 4 are simply duplicating existing behaviour, but perhaps we can get a more optimal version in future
- istream ctor is intended as an extension point that can then be used to create free/static functions to work with any future data source (vector), while the path ctor is a convenience function for the common case (from file)
2018-07-02 21:33:27 +12:00
Crzyrndm
e0d62b0835 Cleanup from review 2018-06-26 20:32:59 +12:00
Crzyrndm
0325c19488 Cleanup 2018-06-25 23:17:21 +12:00