453 Commits

Author SHA1 Message Date
djowel 8913607a37 Disabled this for now, due to ODR violations $$$ Fix Me $$$ 2023-08-29 14:32:41 +08:00
djowel 665047aac2 avoid ODR by making this const 2023-08-28 08:33:46 +08:00
Nikita Kniazev 5d93a2abd9 Suppress -Wdeprecated-copy on Clang 13 (#108)
* Suppress `-Wdeprecated-copy` on Clang 13

Clang 13 now also emits `-Wdeprecated-copy` when a copy assign operator is deleted. Since we need both `actor` to be an aggregate and to disallow assignment -- the only other way is to suppress the warning.

* Fix CI: replace `os: "ubuntu-xx.04"` workers with containers

ubuntu-16.04 is already removed from GHA and ubuntu-18.04 will be soon removed too

* Fix CI: Install only necessary stuff in containers

* Run CI in any branch
2022-09-13 06:35:59 +08:00
Beojan Stanislaus 8b6a9c26c1 std::tuple support (Resolving #103) (#104)
* Add get_ for std::tuple support

* Account for MSVC not defining __cplusplus properly

* Fix test definition

* Skip tuple test if C++11 not available

* Make C++11 compatible

* Bump minimum standard for tuple support to C++ 14

Return type deduction is necessary because this can depend on parameters to
get.

* Remove debug type that made compile fail

* Also remove the use of that debug type

* Rename tuple.cpp to tuple_test.cpp

* Use direct initialization in tuple_test.cpp

* Bump osx_image for Travis

* Make tuple.hpp comply with standard style
2021-03-12 05:59:28 +08:00
Nikita Kniazev bf8625db62 actor: Remove copy assignment operator
In #64 when I made actor utilize Proto generated assignment operators, I missed
that Phoenix copy assignment operator was not producing a lazy expression,
instead it simply copied the state over. I do not know why that was done in the
first place, the previous behavior is not logical to me, and the current one is
more justified, however after thinking thoroughly there is not a lot of use
cases for it, the only I had come with is:

```cpp
#include <boost/phoenix.hpp>
#include <iostream>

int main()
{
  using namespace boost::phoenix;

  int i = 0, j = 123;
  auto ri = ref(i);
  (ri = ref(j))();
  std::cout << "i=" << i << ", j=" << j << "\n";
}
```

Since the behavior was broken 6 releases (2.5 years) ago, what is enough time
to some one to spot the change and report a regression, but we have not received
any, and the new behavior has a little value, I think it is better to simply
remove the copy assignment operator, because it will allow us to solve naturally
the issue with the `-Wdeprecated-copy` warning (otherwise we need either to
define copy constructor and it will break code that relies on `actor` being an
aggregate, or suppress the warning what currently impossible on GCC).
2020-06-08 15:10:36 +03:00
Mathias Gaunard e5b9552d43 add is_actor specialization for try_catch_actor 2020-03-22 16:42:58 +00:00
Mathias Gaunard 6e847888a8 hold subexpressions in try catch generator by value, avoid dangling references and UB 2020-03-22 16:42:38 +00:00
Nikita Kniazev 8194d7258b mem_fun_ptr store ptr actor by value
Fixes hard to avoid use-after-scope bugs (tests already have them).
Storing ptr actor also strips one level of indirection and is an optimization.
2020-03-21 21:06:12 +03:00
Joel de Guzman bc72af7c5d Merge pull request #87 from Kojoley/remove-broken-visit_each
Remove broken visit_each
2019-12-06 22:11:38 +08:00
Nikita Kniazev 6752308ec2 Remove obsolete Fusion bug workaround
Including the header were just hiding a bug in Fusion, since the bug was fixed
(https://github.com/boostorg/fusion/pull/216) the workaround is obsolete.
2019-12-05 20:16:02 +03:00
Nikita Kniazev e920aa8108 Remove broken visit_each
The test for it is not run by the test suit, it does not compile because of
missing includes somewhere, and fixing compilation is not the end of the story.
The `visit_each` seems to be simply never worked, running the test fails with a
wrong result.

The only potential usage of `visit_each` is the Signals1/2 library, and I did
not find any bug report about that.
2019-12-04 19:44:04 +03:00
Nikita Kniazev 2fc69365f2 Remove never used phx2_result
Was added in 74722b8e46 with a message that it
is not ready, yet the headers are included with every Phoenix usage, affecting
compilation times. It was supposed to implement backward compatibility with
Phoenix 2 result protocol, what now seems to have little to zero value, since
the break happened about ten years ago.

Deleted tests:
  * `function_tests_phx2` duplicates `function_tests`
  * `bind_function_object_tests_phx2` duplicates `bind_function_object_tests`
  * `lambda_tests_phx2` duplicates `lambda_tests18`+`lambda_tests19`
2019-11-27 21:58:17 +03:00
Nikita Kniazev 5cbd440a3d Setup core/debug.hpp redirection 2019-11-27 00:51:54 +03:00
Nikita Kniazev 8b4cb05a4d Move debug.hpp out of core 2019-11-27 00:51:52 +03:00
Nikita Kniazev 7314b528dc Simplify function_equal
Both C++03 and C++11 routines.
2019-11-26 15:56:03 +03:00
Nikita Kniazev be6196cdaf Do not include the whole Predef library
Because of a single macro definition Phoenix includes the whole Predef
library.
2018-12-27 00:05:03 +03:00
Kohei Takahashi 389b204baf Merge pull request #61 from Kojoley/fix-let-assigned-from-construct-from-array
Fix let assigned from construct from array
2018-02-07 23:39:50 +09:00
Nikita Kniazev e35373aa99 Actor is taken by reference on assignment/subscript 2018-02-05 20:58:30 +03:00
Nikita Kniazev 492938cdc8 Repair custom terminal support 2018-02-02 15:37:02 +03:00
Kohei Takahashi 29540a543b Merge pull request #64 from Kojoley/use-proto-expr-op-overload-buildins
Use proto subscript and assignment overload operators buildins
2018-02-01 09:59:59 +09:00
Nikita Kniazev f094543a5e Remove unused detail::assign 2018-01-27 14:57:52 +03:00
Nikita Kniazev 1e66ae741f Use proto subscript and assignment overload operators buildins 2018-01-27 14:53:31 +03:00
Daniela Engert 0ed67ea719 Inheriting std::iterator is deprecated in c++17.
Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-01-27 08:47:46 +01:00
Nikita Kniazev 49a4618d10 Fix let assigned from construct from array 2018-01-25 03:06:20 +03:00
Kohei Takahashi a6cf5063f8 Added preprocessed files 2018-01-20 04:34:59 +09:00
Kohei Takahashi b04a925288 Fixed pp-ed files switch 2018-01-20 04:34:59 +09:00
Nikita Kniazev db4c79fe7c C++11: Fixed bug with initializing phoenix lazy from array types
Type `const T [N]` decays to `T *const` when you place it into a function signature.

Closes https://svn.boost.org/trac10/ticket/12733.
2017-12-29 13:46:31 +03:00
Kohei Takahashi 354ed2335b Include correct headers instead of fwd-decl. 2017-05-31 08:35:20 +09:00
Kohei Takahashi 3d4c1d5dd5 Disable random_suffle in C++17. 2017-05-26 01:50:05 +09:00
Kohei Takahashi a55b0649a2 erase now returns iterator in c++11 mode. 2017-05-14 23:54:12 +09:00
Kohei Takahashi 9914b2ce99 Update doc and comment. 2017-05-14 13:40:54 +09:00
Kohei Takahashi a416e8b19c Lazy functions for set and multiset should be worked now. 2017-05-13 17:46:33 +09:00
Kohei Takahashi fd97b856bd preprocess 2016-09-04 20:01:55 +09:00
Kohei Takahashi abf824e074 Workaround for older GCC.
GCC 3.4 and 4.0 reject SFINAE-based overloads with same parameter.
2016-09-04 19:49:16 +09:00
Kohei Takahashi 5055e69398 preprocess 2016-09-04 17:57:58 +09:00
Kohei Takahashi 1013135e6b Don't overload with return type. (#46)
Some older GCC fails to overload.
2016-09-04 12:42:12 +09:00
Kohei Takahashi 40b51e1f39 Make is_std_unordered_* available at any time. (#45) 2016-09-04 11:40:23 +09:00
Kohei Takahashi 099162a1f3 Fix unused parameter warning. 2016-09-03 17:36:18 +09:00
Nikita Kniazev 30b7f2afa1 Fixed extra semicolon 2016-09-01 17:52:03 +03:00
Kohei Takahashi 0c401e7c12 Fix result type deduction failure.
In some cases, result type deduction is failed due to specialization
restricts to const cv-ref even though doesn't change it.

```
const char X = 'x';
phx::find(boost::as_literal("fox"), arg1)(X); // works

char X = 'x';
phx::find(boost::as_literal("fox"), arg1)(X); // should be accepted, but...
```
2016-08-27 16:36:28 +09:00
Kohei Takahashi 078a63e7b9 Fix missing specialization. 2016-08-25 13:01:13 +09:00
Kohei Takahashi 9070b69718 Fixes too few arguments error on binary math func.
Because incorrect decltype usage within result;
2016-08-19 11:02:04 +09:00
Kohei Takahashi 4f0544edeb Suppress unused warnings. 2016-08-18 17:37:28 +09:00
Kohei Takahashi 3c171945bb Disable variadics with some older compiler
which cannot expand parameter pack into fixed length templates.
2016-08-17 21:05:18 +09:00
Kohei Takahashi a79d2fcf26 Temporary disable variadic scope on MSVC 2013.
It's very hard to avoid compiler bug.
2016-08-16 01:35:31 +09:00
Kohei Takahashi 5e6e39a306 Workarounds for MSVC 12 and 14. 2016-08-14 02:05:59 +09:00
Kohei Takahashi 8bb1bdbb90 Merge branch 'develop' into variadics 2016-08-10 01:24:33 +09:00
Kohei Takahashi 0d3abcc997 regen 2016-08-10 00:52:27 +09:00
Kohei Takahashi 325604c3f0 Remove unused files. 2016-08-10 00:48:21 +09:00
Kohei Takahashi 185c5ee240 Merge branch 'develop' into config-unordered 2016-07-25 10:31:00 +09:00