Commit Graph

20 Commits

Author SHA1 Message Date
CromwellEnage
7b2d3f6e41 Reinstate MP11 support for ArgumentPacks
Argument packs qualify as Boost.MP11-style maps as well as MPL sequences.  These maps store the keyword tag types as their keys.
2019-01-21 01:14:59 -05:00
CromwellEnage
6bce8119bf Disable MP11 usage for affected tests 2019-01-19 17:42:41 -05:00
CromwellEnage
fe73177b6c Modify MP11 support
These are breaking changes to PR #66.

* Remove are_tagged_arguments_mp11 and is_argument_pack_mp11.  They were reviewed as redundant.
* Remove MP11 support for ArgumentPack models for now.  (This feature relied on templates that were not supposed to be specialized.)
2019-01-19 15:15:20 -05:00
CromwellEnage
69db508992 Support Boost.MP11 when feasible
* Add are_tagged_arguments_mp11 and is_argument_pack_mp11 metafunctions when Boost.MP11 is usable.
* Predicate requirements can be encoded as Boost.MP11-style quoted metafunctions as well as by MPL binary metafunction classes.
* Argument packs qualify as Boost.MP11-style lists as well as MPL sequences.
* Internal components and test programs use Boost.MP11 and C++11 type traits vice MPL and Boost.TypeTraits when Boost.MP11 is usable.
2019-01-16 12:03:44 -05:00
CromwellEnage
a2f68bea6c Update test suite
* Add "test/literate/parameter-enabled-function-call-operators0.cpp" to test suite under alias 'parameter_literate_tests'.
* Add compose() test routine to "test/compose.cpp"
* Replace LIBS_PARAMETER_TEST_COMPILE_FAILURE_MSVC with LIBS_PARAMETER_TEST_COMPILE_FAILURE_VENDOR_SPECIFIC in case compilers other than MSVC start exhibiting errant behavior.
* Adjust for the fact that BOOST_PARAMETER_MAX_ARITY is defined regardless of whether or not BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.
* Use minimal file headers to #include vice <boost/parameter.hpp>.
2019-01-16 03:21:13 -05:00
CromwellEnage
655fb40414 Fix mpl::has_key_impl<parameter::aux::arg_list_tag> specialization
<boost/parameter/aux_/arg_list.hpp>
* Use parameter::value_type vice mpl::find.

"test/compose.cpp"
* Test that mpl::has_key evaluates to mpl::false_ for keyword tags that are not in parameter::aux::arg_list.

"test/singular.cpp"
* Test that mpl::has_key evaluates to mpl::false_ for keyword tags that are not in parameter::aux::tagged_argument or parameter::aux::tagged_argument_rref.
2018-11-29 14:20:36 -05:00
Edward Diener
d5cd72d2fd Remove executable permissions. 2018-11-16 21:42:25 -05:00
CromwellEnage
3c494b663f Add missing boost::parameter::aux::tagged_argument_rref::operator[] overloads
Ultimately needed by "libs/graph/test/isomorphism.hpp"
2018-11-16 02:58:27 -05:00
CromwellEnage
65af83cdbe Update compose.cpp
Add code to test BOOST_PARAMETER_NESTED_KEYWORD.
2018-11-10 07:23:29 -05:00
CromwellEnage
66b4af0125 Add metafunction boost::parameter::is_argument_pack
Also upgrade boost::parameter::aux::arg_list, boost::parameter::aux::tagged_argument, and boost::parameter::aux::tagged_argument_rref to model the MPL Associative Sequence concept.
2018-11-09 00:32:34 -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
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
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
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
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
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
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
Rene Rivera
d1f8f1f736 Fix to allow piecewise parameter composition.
[SVN r33189]
2006-03-01 16:55:11 +00:00