Commit Graph

596 Commits

Author SHA1 Message Date
Edward Diener
6a53e1ac6b
Merge pull request #26 from CromwellEnage/perfect_forwarding_with_cxx03_support
Reinstate C++03 workarounds
2018-11-07 18:18:11 -05:00
CromwellEnage
8ad69bc3f3 Fix .travis.yml
Mark ICE failures as expected.
2018-11-07 12:08:22 -05:00
CromwellEnage
00ac706ad8 Reinstate C++03 workarounds
Resolve merge conflicts arising from merging PR#23 into boostorg:develop.
2018-11-07 10:30:26 -05:00
Cromwell D. Enage
899891d1a3
Merge with boostorg/parameter 2018-11-07 10:14:24 -05:00
Edward Diener
80e1289bf0
Merge pull request #23 from CromwellEnage/perfect_forwarding
Support perfect forwarding
2018-11-07 08:21:55 -05:00
CromwellEnage
9b7eef1fe3 Update boost/parameter/config.hpp
Remove dependency on Boost.Move macros.
2018-11-06 14:11:12 -05:00
CromwellEnage
dceef04330 Update boost/parameter/aux_/maybe.hpp
Remove unused #include statements.
2018-10-31 01:52:54 -04:00
CromwellEnage
5fb1ef2871 Fix boost/parameter/parameters.hpp
Change erroneous #include statement from <boost/fusion/container/vector/vector_fwd.hpp> to <boost/fusion/container/list/list_fwd.hpp>.
2018-10-31 00:41:49 -04:00
CromwellEnage
44b34e10f6 Remove c++03 support.
* Replace calls to boost::forward with calls to std::forward.

<boost/parameter/config.hpp>
* Relax perfect forwarding requirements so that msvc-12.0 passes muster.

<boost/parameter/parameters.hpp>
* Use boost::mpl::vector if neither boost::fusion::list nor boost::fusion::deque are true variadic MPL sequences.

.travis.yml
appveyor.yml
* Remove test configurations of compilers that fail perfect forwarding requirements.
* Consolidate for fewer jobs.
2018-10-30 08:42:18 -04:00
CromwellEnage
0112583599 Support perfect forwarding
1. The end of section 3.2.1 of the current home page tutorial notes "that because of the forwarding problem, parameter::parameters::operator() can't accept non-const rvalues."  Add code to eliminate this problem.  As a positive side effect, Boost.Parameter-enabled functions and constructors are no longer bound by BOOST_PARAMETER_MAX_ARITY on compilers that support perfect forwarding. User code can now check for this support by detecting the configuration macro BOOST_PARAMETER_HAS_PERFECT_FORWARDING, or manually turn off this support by defining the configuration macro BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING.  See "test/evaluate_category.cpp" and "test/preprocessor_eval_category.cpp" for example usage.

2. Add parameter category qualifiers "consume" and "move_from"(current qualifiers are "in", "out", "in_out", and "forward") based on http://www.modernescpp.com/index.php/c-core-guidelines-how-to-pass-function-parameters.

3. Update documentation to reflect the above changes.
2018-10-29 10:10:01 -04:00
Cromwell D. Enage
77a9508a65
Merge with boostorg/parameter 2018-10-29 07:39:29 -04:00
Edward Diener
cace644c0e
Merge pull request #22 from CromwellEnage/restructure_tests
Restructure tests
2018-10-29 05:02:57 -04:00
CromwellEnage
d526784e05 FIx misspelling. 2018-10-28 23:34:31 -04:00
CromwellEnage
5b554b5f44 Remove dependency on boost::container::string
Replace with std::string.
2018-10-28 22:49:55 -04:00
CromwellEnage
06a0cc79e5 Prettify code 2018-10-28 22:14:17 -04:00
CromwellEnage
278a728906 Restructure tests.
<boost/parameter/parameters.hpp>:
* Add preprocessor conditional statement to prevent generation of ill-formed function call operator overloads.

"test/maybe.cpp"
"test/singular.cpp"
"test/tutorial.cpp"
"test/sfinae.cpp"
"test/earwicker.cpp"
* Replace BOOST_PARAMETER_KEYWORD statements with BOOST_PARAMETER_NAME statements.

"test/optional_deduced_sfinae.cpp"
"test/normalized_argument_types.cpp"
"test/literate/*.cpp"
* Use Boost.Core.LightweightTest where int main() is available.
* Replace assert statements with BOOST_TEST_EQ statements.

"test/basics.hpp"
* Remove preprocessor statements regarding borland, gcc-2, and msvc workarounds.

"test/ntp.cpp"
"test/sfinae.cpp"
"test/earwicker.cpp"
"test/normalized_argument_types.cpp"
"test/basics.hpp"
* Add preprocessor conditional statement to #error out if BOOST_PARAMETER_MAX_ARITY is set to an insufficient value.

"test/basics.cpp"
"test/deduced.cpp"
"test/macros.cpp"
"test/preprocessor.cpp"
"test/preprocessor_deduced.cpp"
* Replace S and char const* expressions with boost::container::string expressions.
* Uncomment any code that fails to compile, but add preprocessor conditional statement so that test suites can incorporate compile-fail statements regarding the code in question.
* Ensure that int main() returns boost::process_errors().

"test/literate/deduced-template-parameters0.cpp":
"test/literate/exercising-the-code-so-far0.cpp":
* Enclose BOOST_MPL_ASSERT statements within MPL_TEST_CASE block.

"test/literate/defining-the-keywords1.cpp":
* Add graphs::tag::graph::qualifier type definition because perfect forwarding code will check for it.
* Replace deprecated keyword::get() invocation with keyword::instance invocation.

test/Jamfile.v2:
* Add modifier <define>BOOST_PARAMETER_MAX_ARITY=# to run, run-fail, compile, and compile-fail statements to conserve compiler memory usage on GitHub's side.
* Add modifier <preserve-target-tests>off to run and run-fail statements to conserve executable space on GitHub's side.
* Separate bpl-test statement into its own target, parameter_python_test, which fails on xcode8.3 as well as on mingw and msvc compilers with address-model=64.
* The next commit (which will implement perfect forwarding) will subsume test/literate/Jamfile.v2 into this file.  Strangely enough, attempting to do so now will result in compiler errors.

.travis.yml:
* Add g++-4.7, g++-4.8, g++-4.9, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, xcode7.3, and xcode8.3 compiler configurations.
* Split compiler configurations by available CXXSTD values.  (This will keep the job times within limits for the next commit.)
* Ensure that the xcode8.3 compiler configurations exclude parameter_python_test from the test suite.

appveyor.yml:
* Add compiler configurations that support address-model=64 to the test matrix.
* Ensure that the new configurations exclude parameter_python_test from the test suite.
2018-10-28 13:13:07 -04:00
Cromwell D. Enage
79e042b590
Merge with boostorg/parameter 2018-10-25 22:29:20 -04:00
Edward Diener
57e3674bdd
Merge pull request #21 from CromwellEnage/qualified_name
Support additional parameter categories
2018-10-25 21:59:19 -04:00
CromwellEnage
7441b2e72b Support additional parameter categories
Add parameter category qualifier "forward" (current qualifiers are "in", "out", and "in_out") based on http://www.modernescpp.com/index.php/c-core-guidelines-how-to-pass-function-parameters.  Add new usage syntax BOOST_PARAMETER_NAME((object-name), namespace-name) qualifier(tag-name)) and BOOST_PARAMETER_NAME(qualifier(name)).  (Existing code that uses qualifiers directly and correctly with BOOST_PARAMETER_FUNCTION and other code generation macros should remain unaffected for now, so no breaking changes.)  The reason for the change in usage is to enable applying of parameter category constraints to Boost.Parameter-enabled functions and constructors invoked through argument composition.  (Otherwise, it is currently possible to use argument composition to bypass parameter category constraints applied in BOOST_PARAMETER_FUNCTION et. al.) See "test/compose.cpp" for example usage.
2018-10-25 19:17:41 -04:00
Cromwell D. Enage
105bde609d
Merge with boostorg/parameter 2018-10-25 14:00:08 -04:00
Edward Diener
1f25e851bc
Merge pull request #20 from CromwellEnage/function_call_operator
Support Boost.Parameter-enabled function call operators.
2018-10-25 10:47:02 -04:00
CromwellEnage
c54b59f8b7 Support Boost.Parameter-enabled function call operators.
* Add code generation macros BOOST_PARAMETER_FUNCTION_CALL_OPERATOR and BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR to <boost/parameter/preprocessor.hpp>.
* Also, add documentation for BOOST_PARAMETER_CONST_MEMBER_FUNCTION, BOOST_PARAMETER_BASIC_FUNCTION, BOOST_PARAMETER_BASIC_MEMBER_FUNCTION, and BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION.
2018-10-25 07:58:11 -04:00
Cromwell D. Enage
8dcdeb307c
Merge with boostorg/parameter 2018-10-25 05:55:34 -04:00
Edward Diener
3eb4c31f6f
Merge pull request #18 from CromwellEnage/more_modular
Restructure code
2018-10-24 21:53:21 -04:00
CromwellEnage
b0785c2931 Update documentation
Document that boost::parameter::required, boost::parameter::optional, and boost::parameter::deduced are defined in their own header files, which are in turn #included by <boost/parameter/parameters.hpp>.
2018-10-24 16:54:44 -04:00
CromwellEnage
0fdf92a4e3 Update keyword.hpp
Add #include statement for forward declaration.
2018-10-24 12:42:14 -04:00
CromwellEnage
5f5d777691 Restructure code
<boost/parameter/name.hpp>:
* Move support metafunction definitions and BOOST_PARAMETER_TAG_PLACEHOLDER_TYPE macro definition to <boost/parameter/aux_/name.hpp>.
* Move BOOST_PARAMETER_IS_BINARY macro definition to <boost/parameter/aux_/preprocessor/is_binary.hpp>.
* Use BOOST_PARAMETER_TAG_PLACEHOLDER_TYPE macro.
2018-10-24 12:32:27 -04:00
CromwellEnage
2169c5adb4 Restructure code
<boost/parameter/aux_/arg_list.hpp>:
Move forward declarations to their own header files.

<boost/parameter/aux_/tagged_argument.hpp>:
* Move boost::parameter::aux::tagged_argument_base, boost::parameter::aux::is_tagged_argument_aux, and boost::parameter::aux::is_tagged_argument to <boost/parameter/aux_/is_tagged_argument.hpp>
* Remove unnecessary forward declarations.

<boost/parameter/parameters.hpp>:
* Move support metafunction definitions to their own header files in directory boost/parameter/aux_/pack.
* Move support macro definitions to <boost/parameter/aux_/preprocessor/no_perfect_forwarding_begin.hpp> and their corresponding #undef statements to <boost/parameter/aux_/preprocessor/no_perfect_forwarding_end.hpp>.

<boost/parameter/aux_/overloads.hpp> works at the preprocessor level, so move to <boost/parameter/aux_/preprocessor/overloads.hpp>.

<boost/parameter/preprocessor.hpp>:
* Move voidstar type definition to <boost/parameter/aux_/void.hpp>.
* Move support metafunctions to their own header files in directory boost/parameter/aux_/pp_impl.
* Move support macros to header files in directory boost/parameter/aux_/preprocessor/impl.
2018-10-24 12:09:26 -04:00
Cromwell D. Enage
38ef081b68
Merge with boostorg/parameter 2018-10-23 15:21:48 -04:00
Edward Diener
3fdc70d227
Merge pull request #17 from CromwellEnage/compose_with_function_as_argument
Upgrade boost::parameter::aux::tagged_argument
2018-10-23 15:02:02 -04:00
CromwellEnage
8df8cb6417 Update test suite
test/compose.cpp:
Change workarounds from boost::function to std::function since msvc-11.0 reports having a C++11-compliant <functional> header.
Add LIBS_PARAMETER_TEST_RUN_FAILURE configuration macro to facilitate run-fail testing.

test/Jamfile.v2:
Replaced deprecated test-suite statement with alias statements.
Added run-fail test case under its own alias statement.

appveyor.yml:
Add mingw compiler configurations to the test matrix.
Update msvc-11.0 configuration to also execute the run-fail test.

travis.yml:
Ensure that only the standard tests are run, not the run-fail test.
2018-10-23 03:42:03 -04:00
Cromwell D. Enage
7b3f03cb67
Merge pull request #2 from boostorg/develop
Merge with boostorg/parameter
2018-10-19 13:26:03 -04:00
CromwellEnage
42c2996cda Revert "Move preprocessor conditional expressions from main() in test/compose.cpp to tagged_argument.hpp" 2018-10-19 13:05:55 -04:00
CromwellEnage
779fd40e4a Move preprocessor conditional expressions from main() in test/compose.cpp to tagged_argument.hpp
Test the behavior of MSVC-11.0.
2018-10-19 12:24:50 -04:00
CromwellEnage
03c1b24665 Update test/Jamfile.v2
Change compile statement to run statement for compose.cpp
2018-10-19 11:19:11 -04:00
Edward Diener
6fc8feb510
Merge pull request #16 from CromwellEnage/unwrap_cv_reference
Upgrade boost::parameter::aux::unwrap_cv_reference
2018-10-19 09:19:10 -04:00
CromwellEnage
deb0c3b8a3 Upgrade boost::parameter::aux::tagged_argument
Add support for passing functions as arguments to Boost.Parameter-enabled functions.
2018-10-19 02:17:42 -04:00
CromwellEnage
2364c383fa Upgrade boost::parameter::aux::unwrap_cv_reference
Add support for std::reference_wrapper<> and std::ref().
2018-10-19 01:32:57 -04:00
Cromwell D. Enage
ce8ce02ef8
Merge pull request #1 from boostorg/develop
Merge with boostorg/parameter
2018-10-18 01:24:45 -04:00
Edward Diener
ff835044e2
Merge pull request #15 from CromwellEnage/function_type_tpl_param
Upgrade BOOST_PARAMETER_TEMPLATE_KEYWORD
2018-10-17 18:44:32 -04:00
CromwellEnage
5e332ad592 Fix test/Jamfile.v2
Change run statement to compile statement.
2018-10-16 05:04:37 -04:00
CromwellEnage
fb88905a99 Upgrade BOOST_PARAMETER_TEMPLATE_KEYWORD
Keyword templates generated by BOOST_PARAMETER_TEMPLATE_KEYWORD can now accept function types.
2018-10-16 05:01:27 -04:00
Peter Dimov
5d3e39325e Fix link to Python bindings 2018-10-16 06:40:55 +03:00
Peter Dimov
058b1394f5 Use glob instead of path.glob, as it's relative to the Jamfile 2018-10-16 06:26:47 +03:00
Peter Dimov
de183a3b75 Update the parameter_python submodule, as we still keep the Python tests here 2018-10-15 00:29:51 +03:00
Peter Dimov
28a8f75d83 Remove parameter_python documentation 2018-10-15 00:27:41 +03:00
Peter Dimov
2e9b937082 Remove parameter_python headers 2018-10-15 00:26:55 +03:00
Peter Dimov
61d476d4b6 Add libstdc++-5-dev for clang, or <complex> doesn't compile in C++14 mode 2018-10-14 07:35:10 +03:00
Peter Dimov
02a59d2091 Add return boost::report_errors(); 2018-10-13 19:50:17 +03:00
Peter Dimov
007a24b76c Add more Travis configurations 2018-10-13 04:44:05 +03:00