Commit Graph

182 Commits

Author SHA1 Message Date
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
Edward Diener
3ecf27411b Fixed code when specifying as_lvalue. 2018-11-14 20:22:54 -05:00
Edward Diener
e51b85d85f Distinguish same named run time tests by target. 2018-11-14 12:48:09 -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
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
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
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
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
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
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
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
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
02a59d2091 Add return boost::report_errors(); 2018-10-13 19:50:17 +03:00
Edward Diener
6f747e9869 Removed git executable tag. 2017-09-14 07:57:05 -04:00
Edward Diener
612563e0fe Include math.h first to avoid Python _hypot redefinition bug 2016-11-07 15:33:55 -05:00
Edward Diener
904e2f5020 Use unique_ptr instead of auto_ptr where appropriate 2016-11-07 15:32:11 -05:00
Edward Diener
6ad2d6b207 Fixed ADL problem upon invocation 2015-07-19 13:03:39 -04:00
Edward Diener
aaf00c5449 Remove unneeded and incorrect #line directives, which just confuse some compilers, most notably VC++ which fails some tests purely on its confusion. 2015-05-27 10:03:38 -04:00
Daniel Wallin
436209fa82 Fix Boost.Parameter documentation bugs. Properly test type requirements example.
[SVN r75417]
2011-11-08 22:00:12 +00:00
Andrey Semashev
ee32bc6f67 Fixed test compilation with C++0x aware compilers. The bind and ref calls should be explicitly qualified with the boost namespace.
[SVN r62241]
2010-05-26 16:30:14 +00:00
Troy D. Straszheim
522c1e33b0 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Troy D. Straszheim
298108e7ed Copyrights on CMakeLists.txt to keep them from clogging up the inspect
reports.  This is essentially the same commit as r55095 on the release
branch.



[SVN r55159]
2009-07-26 00:49:56 +00:00
Daniel Wallin
4af5c63d46 parameter-doc: Added missing default value on optional parameter
specification.


[SVN r50915]
2009-01-30 21:08:22 +00:00
David Deakins
1c2f56c672 Restored static-member-functions0 test
[SVN r50890]
2009-01-30 05:55:10 +00:00
Dave Abrahams
08b0a74035 Check in missing file (thanks for pointing that out, David Deakins!)
[SVN r50889]
2009-01-30 00:52:33 +00:00
David Deakins
4c8725641d Commented out missing test file
[SVN r50888]
2009-01-30 00:09:10 +00: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
Michael A. Jackson
f9a2fba9ab Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use.
[SVN r49627]
2008-11-07 17:02:56 +00:00
Michael A. Jackson
55792af45f Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
Nicola Musatti
a4b2742095 Updated to support C++Builder 2007 Update 3 (bcc32 5.9.2)
[SVN r39945]
2007-10-11 21:09:07 +00:00
Vladimir Prus
7689b5b9d0 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Dave Abrahams
f7611b8a1f Correct testing bugs:
either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST
    (in my code only)

    or adding "return boost::report_errors();" where it was clearly
    missing (and a pure bug, in anyone's code).


[SVN r37057]
2007-02-24 22:40:59 +00:00
Daniel Wallin
b67fbdff8f Fixed some regressions and added expected failure markup.
[SVN r35451]
2006-10-02 23:35:39 +00:00
Daniel Wallin
0e263f5602 Fixed python test regression and PP test failure.
[SVN r35404]
2006-09-29 00:30:42 +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
dbbe37b8c1 Added namespace qualification to "index". Fixes ambiguity problems on
gcc.


[SVN r35359]
2006-09-28 10:22:12 +00:00
Daniel Wallin
913fa2eb44 Added test for lazy_defaults.
[SVN r35356]
2006-09-27 20:58:22 +00:00
Daniel Wallin
164c48c018 added expected failure markup
[SVN r35337]
2006-09-26 13:57:07 +00:00
Daniel Wallin
2ac8833532 Fixed regressions on borland.
[SVN r35334]
2006-09-26 09:51:38 +00:00
Markus Schöpflin
6556e278c6 Python header must be included first.
[SVN r35319]
2006-09-25 10:40:35 +00:00
Daniel Wallin
c7296b9a05 Added value_type metafunction and tag::_ convenience syntax.
[SVN r35258]
2006-09-21 17:29:15 +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
Dave Abrahams
07987bc97c SunPro workarounds (fixed)
[SVN r35206]
2006-09-19 15:33:48 +00:00
Dave Abrahams
b59c238a83 SunPro workarounds
[SVN r35205]
2006-09-19 15:31:32 +00:00
Daniel Wallin
9dfa5a8d9e Fixed typo and added SFINAE test.
[SVN r35196]
2006-09-19 13:12:44 +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
0335832574 Sun workarounds
[SVN r35136]
2006-09-16 18:04:50 +00:00
Dave Abrahams
b9f287ea52 Parameter library Workarounds for Borland and MSVC
Parameter library explicit markup for expected failures

value_init.hpp:
  Borland workarounds
  Use angle-includes consistently


[SVN r35084]
2006-09-13 03:00:18 +00:00
Dave Abrahams
28f98ecbf0 Use new working mpl::set functionality.
[SVN r35082]
2006-09-13 00:26:55 +00:00
Dave Abrahams
5baef32925 add missing license/copyright info
[SVN r35068]
2006-09-11 22:08:18 +00:00
Daniel Wallin
cc8ca29980 workarounds for vc6/vc7/borland
[SVN r35020]
2006-09-02 14:36:22 +00:00
Daniel Wallin
e2405e2d00 Added casting of arguments to BOOST_PARAMETER_FUNCTION().
[SVN r35019]
2006-09-02 13:37:23 +00:00
Daniel Wallin
40332972ca Added predicate test to preprocessor.cpp
[SVN r34830]
2006-08-06 21:41:30 +00:00
Daniel Wallin
36d25230e6 Added CallPolicies tests.
[SVN r34476]
2006-07-07 17:40:01 +00:00
Daniel Wallin
8162166037 updated pp syntax
[SVN r34309]
2006-06-15 11:07:30 +00:00
Daniel Wallin
5b1971f1ef Added support for static member functions
[SVN r34124]
2006-05-31 09:44:57 +00:00
Daniel Wallin
2a0397c1b2 new macros, macro renames and bugfix
[SVN r34116]
2006-05-30 08:50:33 +00:00
Daniel Wallin
a181afc699 new Parameter.Python syntax
[SVN r34093]
2006-05-26 10:52:56 +00:00
Daniel Wallin
acbf69fdb6 *** empty log message ***
[SVN r33950]
2006-05-06 22:35:42 +00:00
Daniel Wallin
ae05e30eac New PP syntax, initial checkin.
[SVN r33948]
2006-05-06 22:00:28 +00:00
Dave Abrahams
45d320a434 Reorganized preprocessor stuff, made vc6 work.
[SVN r33703]
2006-04-15 01:39:17 +00:00
Daniel Wallin
0fb6393510 fixed v2 jamfile
[SVN r33299]
2006-03-10 07:19:55 +00:00
Daniel Wallin
4350ac39f5 More tests.
[SVN r33268]
2006-03-08 15:13:53 +00:00
Daniel Wallin
6530322582 More tests.
[SVN r33267]
2006-03-08 12:32:52 +00:00
Rene Rivera
d1f8f1f736 Fix to allow piecewise parameter composition.
[SVN r33189]
2006-03-01 16:55:11 +00:00
Dave Abrahams
764106fe93 Stop using assert() in tests
[SVN r33181]
2006-02-28 22:56:33 +00:00
Dave Abrahams
4a0c231377 Some Borland workarounds
[SVN r32978]
2006-02-17 19:33:42 +00:00
Vladimir Prus
296832a99f Update Jamfile.v2
[SVN r32761]
2006-02-09 09:50:56 +00:00
Daniel Wallin
d21dfd48d8 New Boost.Parameter macros, initial checkin.
[SVN r32678]
2006-02-06 22:06:02 +00:00
Daniel Wallin
2ad4d6a45b Removed use of parameter::aux::void_.
[SVN r32537]
2006-02-04 09:28:19 +00:00
Daniel Wallin
a6b93eb0af Test that NTP's work with reference types.
[SVN r32529]
2006-02-03 18:32:50 +00:00
Daniel Wallin
9479ed3f91 Made the unnamed keyword tag derive from parameter::template_keyword<>.
[SVN r32528]
2006-02-03 18:03:42 +00:00
Daniel Wallin
3b90b4ffa4 Named Template Parameter support in Boost.Parameter.
[SVN r32525]
2006-02-03 15:17:54 +00:00
Dave Abrahams
da78942b0b Even single-element ArgumentPacks that result from keyword assignments are now valid MPL Forward Sequences.
[SVN r32447]
2006-01-27 23:20:49 +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
Dave Abrahams
31f38561ac Merge in material from the parameter-python branch that should have been included here.
[SVN r32444]
2006-01-27 21:21:56 +00:00
Vladimir Prus
4d64b38dad Update Jamfile.v2
[SVN r32351]
2006-01-18 12:46:30 +00:00
Daniel Wallin
88e1488e52 Added test for singular ArgumentPack's.
[SVN r31929]
2005-12-06 11:35:15 +00:00
Daniel Wallin
e129d30002 Removed files that were added on wrong branch
[SVN r31844]
2005-11-30 23:18:31 +00:00
Daniel Wallin
12da98e683 Boost.Parameter->BPL initial checkin
[SVN r31843]
2005-11-30 23:18:30 +00:00
Daniel Wallin
5c79ce742c Added test for detecting duplicate keyword args.
[SVN r31670]
2005-11-15 20:45:54 +00:00
Dave Abrahams
863158c312 Workarounds for vc6
[SVN r31481]
2005-10-26 13:41:04 +00:00
Dave Abrahams
2518454e99 Make tutorial work with gcc-2.95.3
Make efficiency execute a number of repetitions determined by the
speed of the processor.


[SVN r31453]
2005-10-24 20:01:58 +00:00
Dave Abrahams
1e7ca24606 initial commit
[SVN r31303]
2005-10-12 14:51:12 +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