Commit Graph

45 Commits

Author SHA1 Message Date
CromwellEnage
e0b16eb3e9 Improve support for parameter-dependent return types of functions generated by preprocessor macros
The code generation macros are supposed to support parameter-dependent return types, but it turns out that they currently don't really do that.  This commit fixes the issue.
2019-02-02 09:31:15 -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
e5337e2503 Add configuration macro BOOST_PARAMETER_COMPOSE_MAX_ARITY
Decouple the compose() function and the BOOST_PARAMETER_NO_SPEC_* code generation macros from BOOST_PARAMETER_MAX_ARITY for older compilers so their generated functions can take in more arguments.
2019-01-14 17:05:14 -05:00
CromwellEnage
016f949eba Add are_tagged_arguments<>, compose(), and code generation macros
* Add variadic metafunction boost::parameter::are_tagged_arguments to help improve overload resolution capabilities.  Used by compose() and the new BOOST_PARAMETER_NO_SPEC_* code generation macros.
* Add variadic function template compose() which takes in named arguments and returns them in an argument pack.
* Add code generation macros BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR, BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR, BOOST_PARAMETER_NO_SPEC_FUNCTION, BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION, BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION, BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR, BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR, BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR, and BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR.
2019-01-04 08:39:53 -05:00
Edward Diener
6a749bcfb1 Change to distinguish parameter_python_test further between 32 and 64 bit Windows builds. 2018-11-23 00:00:07 -05:00
Edward Diener
b565d53bf8 Do not run python test for clang-linux under Windows. 2018-11-20 20:46:13 -05:00
CromwellEnage
53fa67da1c Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY as 0 by default
User library tests have been reporting numerous failures due to internal compiler errors that occur when perfect forwarding is unsupported.  Setting BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY to zero eliminates these failures.  By doing this in Boost.Parameter, we relieve user code of the burden of doing this in their end.  The trade-off is that our own tests need to define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY explicitly in order to take advantage of the benefits of not having to wrap boost::ref() or std::ref() around non-const lvalues.  As this was always a C++03 workaround, the change should be worth the trade-off.

On an unrelated note, Travis Cl just deprecated "sudo: false".  See <https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures>.
2018-11-20 08:51:32 -05:00
CromwellEnage
7f046f4782 Fix test/Jamfile.v2
s/<version>/<toolset-gcc:version>
2018-11-20 01:50:06 -05:00
CromwellEnage
aab40aafd0 Fix test/Jamfile.v2
Ensure unique test names across aliases.
2018-11-19 21:43:56 -05:00
CromwellEnage
9b8a995b56 Update test/Jamfile.v2
Mark python_test failures on mingw as expected.
2018-11-19 14:54:26 -05:00
CromwellEnage
0283ec60df Fix test suite
"test/Jamfile.v2"
* Rearrange aliases to enable turning off certain tests when they fail for specific compiler configurations
* Reinstate test-suite statement until an undeprecated version can be found.

".travis.yml"
"appveyor.yml"
* Remove specification of alias names
2018-11-19 08:44:56 -05:00
CromwellEnage
716ccb9d85 Rename aliases
Make clear that certain tests run only on certain compilers.
2018-11-17 13:04:24 -05:00
CromwellEnage
a93c420fc7 Fix Issue #31, Issue #32, Issue #33
* Change test/evaluate_category.cpp and test/preprocessor_eval_category.cpp so that the tests pass for msvc-8.0, msvc-9.0, msvc-10.0, and msvc-11.0.
* Change test/Jamfile.v2 so that the compose_fail test runs only for msvc-11.0.
* Ensure that file permissions for header and source files do not include execute.
2018-11-17 11:33:48 -05:00
Edward Diener
c8549fc46d Turn off python test for mingw(-64)/gcc 2018-11-16 14:32:16 -05:00
Edward Diener
f831585e63 Updated for msvc and particular tests. 2018-11-16 07:19:21 -05:00
Edward Diener
e51b85d85f Distinguish same named run time tests by target. 2018-11-14 12:48:09 -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
03c1b24665 Update test/Jamfile.v2
Change compile statement to run statement for compose.cpp
2018-10-19 11:19:11 -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
Dave Abrahams
b91cd816c8 bug fix for value_type and numerous doc fixes, along with literate programming tests
[SVN r50863]
2009-01-28 23:33:37 +00:00
Daniel Wallin
3c815b31fe Changed how normalized_argument_types works to better match user
expectation.


[SVN r35363]
2006-09-28 13:10:44 +00:00
Daniel Wallin
b9248d774f Improved error diagnostics. Made depdendent predicates work on
most compilers. Made optional deduced parameters fail SFINAE
when an unmatched parameter is supplied.


[SVN r35226]
2006-09-20 15:03:35 +00:00
Daniel Wallin
763a09c5aa Removed old tests.
[SVN r35214]
2006-09-19 18:22:55 +00:00
Daniel Wallin
b5c6e05ea0 Made arguments that isn't matched by any parameter-specs an error.
[SVN r35192]
2006-09-19 11:47:54 +00:00
Daniel Wallin
4facdaafc3 New tagging algo. Tests for deduced parameters and preprocessor interface
for deduced parameters.


[SVN r35172]
2006-09-18 20:05:45 +00:00
Dave Abrahams
5baef32925 add missing license/copyright info
[SVN r35068]
2006-09-11 22:08:18 +00:00
Daniel Wallin
0fb6393510 fixed v2 jamfile
[SVN r33299]
2006-03-10 07:19:55 +00:00
Rene Rivera
d1f8f1f736 Fix to allow piecewise parameter composition.
[SVN r33189]
2006-03-01 16:55:11 +00:00
Vladimir Prus
296832a99f Update Jamfile.v2
[SVN r32761]
2006-02-09 09:50:56 +00:00
Daniel Wallin
3b90b4ffa4 Named Template Parameter support in Boost.Parameter.
[SVN r32525]
2006-02-03 15:17:54 +00:00
Dave Abrahams
3e0cdfa6ad Merge in material from the parameter-python branch that should have been included here.
[SVN r32445]
2006-01-27 21:37:05 +00:00
Vladimir Prus
4d64b38dad Update Jamfile.v2
[SVN r32351]
2006-01-18 12:46:30 +00:00
Dave Abrahams
6cf2dcbc84 Martin Wille pointed out some missing header dependencies; fixed.
Also moved boost/python/detail/is_xxx.hpp functionality into
boost/detail/is_xxx.hpp to decouple library dependencies between
python and parameter.


[SVN r31290]
2005-10-11 21:20:06 +00:00
Dave Abrahams
edd6439564 Martin Wille pointed out a missing anonymous namespace; fixed.
Changed Jamfile and Jamfile.v2 so that we'd build the efficiency test
in release mode always.


[SVN r31283]
2005-10-11 14:20:42 +00:00
Dave Abrahams
3902ea1509 Add efficiency measurement
[SVN r30920]
2005-09-12 16:16:31 +00:00
Dave Abrahams
9b59052e48 Added unnamed test.
[SVN r30606]
2005-08-19 23:41:07 +00:00
Dave Abrahams
74a5d3372b Support for Borland C++
[SVN r29520]
2005-06-11 06:46:03 +00:00
Daniel Wallin
3f96c2d9a4 *** empty log message ***
[SVN r28463]
2005-04-24 20:59:30 +00:00
Vladimir Prus
fa6aecfc06 Add V2 Jamfile
[SVN r28244]
2005-04-14 11:56:47 +00:00