Commit Graph

667 Commits

Author SHA1 Message Date
Antony Polukhin
f34376e115
Merge pull request #66 from Kojoley/partly-mitigate-bad-clang-inlining-decision
Partly mitigate bad Clang inlining decision
2019-05-09 10:01:59 +03:00
Antony Polukhin
15a846fba0
CI fixes 2019-05-02 10:45:09 +03:00
Antony Polukhin
8f52f879b5
CI scripts update to deal with container changes 2019-05-02 10:44:06 +03:00
Antony Polukhin
3ed28d2cc5
Merge pull request #71 from boostorg/antoshkka/revert-recursive-move
Revert "Merge pull request #59 from Kojoley/recursive_wrapper-move-co…
2019-05-02 10:32:31 +03:00
Antony Polukhin
b18c22a8ff Revert "Merge pull request #59 from Kojoley/recursive_wrapper-move-constructor-pointer-stealing"
This reverts commit dcbfeb9892, reversing
changes made to 055487c5bb.

Reverts adding a pointer stealing to the recursive_wrapper.
2019-05-01 20:57:40 +03:00
Antony Polukhin
0e122c38fe
Merge pull request #67 from HDembinski/fix_warning
fix for unused argument warning
2019-04-23 08:56:28 +03:00
Antony Polukhin
31ed2a3b70
Merge pull request #68 from ecatmur/apply-visitor-copy-cv-ref
Copy variant cvref when determining result type
2019-04-23 08:55:00 +03:00
Ed Catmur
7331d648f4 Add test. 2019-04-21 00:50:00 +01:00
Ed Catmur
2e32903579 Merge remote-tracking branch 'origin/develop' into apply-visitor-copy-cv-ref 2019-04-20 22:22:12 +01:00
Antony Polukhin
5be655d46f
Update appveyor.yml 2019-04-17 21:23:36 +03:00
Edward Catmur
cbdb354a27 Copy variant cvref when determining result type
Ensures that we can e.g. call apply_visitor on a lvalue variant
2019-04-17 15:05:37 +01:00
Antony Polukhin
b1d66215e1
Update appveyor.yml 2019-04-14 21:58:31 +03:00
Hans Dembinski
66ef97f655 fix_warning 2019-04-14 14:02:19 +02:00
Nikita Kniazev
dd9b0c9b84 Partly mitigate bad Clang inlining decision
Because a visitor is wrapped several times during visitation it cases extra
temporaries usage and useless store and loads that can only be optimized if
the `visitation_impl` is inlined into the function that creates the wrapper.
Clang inliner decides not to inline functions even with small-sized switches,
resulting in a poor visitation code. Forceinline mark on those internal functions perceptibly improves the situation, though does not mitigate it
completely.

LLVM ticket https://bugs.llvm.org/show_bug.cgi?id=41491
2019-04-14 04:26:31 +03:00
Antony Polukhin
74ea828cde
Merge pull request #65 from boostorg/feature/std-hash
Add std::hash specialization for variant (refs #49)
2019-04-12 10:55:46 +03:00
Antony Polukhin
7cc18f356c
Merge pull request #63 from Kojoley/do-not-call-abort
Do not call abort in forced_return
2019-04-12 10:54:17 +03:00
Antony Polukhin
dcbfeb9892
Merge pull request #59 from Kojoley/recursive_wrapper-move-constructor-pointer-stealing
recursive_wrapper move constructor pointer stealing
2019-04-12 10:52:35 +03:00
Antony Polukhin
055487c5bb
Avoid git clone issues 2019-04-02 09:23:59 +03:00
Antony Polukhin
31dcc43faf Add std::hash specialization for variant (refs #49) 2019-04-01 23:45:21 +03:00
Antony Polukhin
c80759d265
Merge pull request #64 from Kojoley/suppress-warnings-in-tests
Suppress warnings in tests
2019-03-27 10:19:55 +03:00
Nikita Kniazev
e20f5eb7b8 Suppress warnings in tests 2019-03-26 17:43:32 +03:00
Nikita Kniazev
3cc73fe162 Do not call abort in forced_return
Reduces code bloating on Clang and MSVC, saves a branch on GCC.
2019-03-26 04:46:43 +03:00
Antony Polukhin
7ecf721f2b
Merge pull request #62 from gjasny/static-visitor-public-dtor
static_visitor: Make destructor public
2019-03-16 17:59:28 +03:00
Antony Polukhin
90e7fbae48
Merge pull request #61 from Mike-Devel/min_cmake
[CMake] Add minimal cmake support
2019-03-09 21:57:30 +03:00
Gregor Jasny
dd728220b0 static_visitor: Make destructor public
otherwise in C++ 17 mode Clang 8 will complain about the
protected destructor:

```
main.cpp:16:33: error: temporary of type 'boost::static_visitor<>' has protected destructor
    boost::apply_visitor(output{}, v);
                                ^
/usr/local/opt/boost/include/boost/variant/static_visitor.hpp:53:5: note: declared protected here
    ~static_visitor() = default;
    ^
```

See also discussion in https://reviews.llvm.org/D53860
2019-03-09 15:25:03 +01:00
Mike Dev
98e2674467 [CMake] Add minimal cmake support
- CMake file only supports add_subdirectory workflow.
- Provides target Boost::variant, but
  no installation and no unit tests
2019-03-08 16:23:41 +01:00
Nikita Kniazev
5c10399096 Added note about pointer stealing to never-empty guarantee design docs 2019-03-04 01:49:35 +03:00
Nikita Kniazev
11d03f3b51 Added macro to docs 2019-02-24 03:42:11 +03:00
Nikita Kniazev
df4e29cf1e Use boost type_traits 2019-02-24 01:44:02 +03:00
Nikita Kniazev
32794c2340 More work done 2019-02-24 00:21:54 +03:00
Nikita Kniazev
754eaf824f Updated the documentation 2019-02-16 18:55:42 +03:00
Nikita Kniazev
af07139502 refine precondition check to a function 2019-02-09 16:20:26 +03:00
Nikita Kniazev
3e93fd428c followup to recursive_wrapper pointer stealing
- Added macro to switch to the old behavior
  - Added valueless_recursive method
  - Removed nullptr and exchange

TODO:
  - Docs
2019-02-08 20:19:21 +03:00
Nikita Kniazev
1364d3ff5f recursive_wrapper move constructor pointer stealing
Instead of allocating a new object just steal the pointer from the other
recursive_wrapper. It is much cheaper and allows to mark the move constructor
noexcept (allows variant to move the object without backup copying it).
2019-01-31 21:15:10 +03:00
Antony Polukhin
d069511e31 Update copyright 2019-01-17 13:00:51 +03:00
Antony Polukhin
ba0746fc9d Temporary disable test for issue #53 2019-01-08 14:18:24 +03:00
Antony Polukhin
46d8b92f73 Increase fetch depth to avoid issues with submodules 2019-01-08 01:01:52 +03:00
Antony Polukhin
b4acbdf3e8 Add test from #53 2019-01-07 23:32:07 +03:00
Antony Polukhin
3850c195d6
Merge pull request #57 from Kojoley/remove-edg-no-sfinae
Remove EDG 3.2 workaround
2019-01-07 23:03:07 +03:00
Nikita Kniazev
06b643df31 Cleanup includes 2019-01-06 22:15:45 +03:00
Nikita Kniazev
3c5a67e48f Removed EDG 3.2 workaround
EDG 3.2 is pretty old (the workaround added 16 years ago).
2019-01-06 20:31:18 +03:00
Antony Polukhin
500778bd7b
Merge pull request #56 from Kojoley/remove-no-void-returns-workaround
Removed NO_VOID_RETURNS workaround
2019-01-06 09:25:26 +03:00
Nikita Kniazev
c4370b2da2 Removed NO_VOID_RETURNS workaround
The workaround is obsolete, from Boost.Config it looks like it was used for
very old EDG2.4, VC6, and other compilers in VC6 emulation mode.
2019-01-06 00:42:58 +03:00
Antony Polukhin
6900641f4f Change coveralls url 2019-01-05 22:37:45 +03:00
Antony Polukhin
7c1171a8dd Run CI on primary repo, rather than on the fork 2019-01-05 22:27:01 +03:00
Antony Polukhin
a0ad527fce
Merge pull request #55 from Kojoley/fix-apply_visitor-decltype-result_type-deduction
Fixed visitor result type deduction at rvalue ref operators
2019-01-05 20:15:57 +03:00
Antony Polukhin
9af72f37bc
Update variant_visit_test.cpp 2019-01-05 20:15:22 +03:00
Nikita Kniazev
4b37f9b804 Fixed visitor result type deduction at rvalue ref operators 2019-01-05 19:54:20 +03:00
Antony Polukhin
4addd1022a Minor changes for the build system 2018-12-23 16:34:00 +03:00
Antony Polukhin
283bff8e21 Merge branch 'develop' into ldionne-visit_deduce 2018-12-23 15:32:54 +03:00