// -*- C++ -*- // Boost general library 'format' --------------------------- // See http://www.boost.org for updates, documentation, and revision history. // (C) Samuel Krempp 2001 // krempp@crans.ens-cachan.fr // Permission to copy, use, modify, sell and // distribute this software is granted provided this copyright notice appears // in all copies. This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // ideas taken from Rüdiger Loos's format class // and Karl Nelson's ofstream // ---------------------------------------------------------------------------- // group.hpp : encapsulates a group of manipulators along with an argument // // group_head : cut the last element of a group out. // (is overloaded below on each type of group) // group_last : returns the last element of a group // (is overloaded below on each type of group) // ---------------------------------------------------------------------------- #ifndef BOOST_FORMAT_GROUP_HPP #define BOOST_FORMAT_GROUP_HPP namespace boost { namespace io { namespace detail { // empty group, but useful even though. struct group0 { group0() {} }; template inline BOOST_IO_STD ostream& operator << ( BOOST_IO_STD ostream& os, const group0& ) { return os; } template struct group1 { T1 a1_; group1(T1 a1) : a1_(a1) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group1& x) { os << x.a1_; return os; } template struct group2 { T1 a1_; T2 a2_; group2(T1 a1,T2 a2) : a1_(a1),a2_(a2) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group2& x) { os << x.a1_<< x.a2_; return os; } template struct group3 { T1 a1_; T2 a2_; T3 a3_; group3(T1 a1,T2 a2,T3 a3) : a1_(a1),a2_(a2),a3_(a3) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group3& x) { os << x.a1_<< x.a2_<< x.a3_; return os; } template struct group4 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; group4(T1 a1,T2 a2,T3 a3,T4 a4) : a1_(a1),a2_(a2),a3_(a3),a4_(a4) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group4& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_; return os; } template struct group5 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group5& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; return os; } template struct group6 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group6& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; return os; } template struct group7 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group7& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; return os; } template struct group8 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group8& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; return os; } template struct group9 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; T9 a9_; group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group9& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; return os; } template struct group10 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; T9 a9_; T10 a10_; group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) {} }; template inline BOOST_IO_STD ostream& operator << (BOOST_IO_STD ostream& os, const group10& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; return os; } template inline group1 group_head( group2 const& x) { return group1 (x.a1_); } template inline group1 group_last( group2 const& x) { return group1 (x.a2_); } template inline group2 group_head( group3 const& x) { return group2 (x.a1_,x.a2_); } template inline group1 group_last( group3 const& x) { return group1 (x.a3_); } template inline group3 group_head( group4 const& x) { return group3 (x.a1_,x.a2_,x.a3_); } template inline group1 group_last( group4 const& x) { return group1 (x.a4_); } template inline group4 group_head( group5 const& x) { return group4 (x.a1_,x.a2_,x.a3_,x.a4_); } template inline group1 group_last( group5 const& x) { return group1 (x.a5_); } template inline group5 group_head( group6 const& x) { return group5 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); } template inline group1 group_last( group6 const& x) { return group1 (x.a6_); } template inline group6 group_head( group72016-04-03build: Add a Guile custom test driver using SRFI-64....Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77. Mathieu Lirzin 2016-03-25syscalls: 'interface-address' can return #f....Fixes <http://bugs.gnu.org/22612>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * tests/syscalls.scm ("network-interfaces returns one or more interfaces"): Accept 'interface-address' value of #f. Ludovic Courtès const& var) { return detail::group1< detail::group3 > ( detail::group3 (a1,a2, var) ); } template inline detail::group1< detail::group4 > group(T1 a1,T2 a2,T3 a3, Var const& var) { return detail::group1< detail::group4 > ( detail::group4 (a1,a2,a3, var) ); } template inline detail::group1< detail::group5 > group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) { return detail::group1< detail::group5 > ( detail::group5 (a1,a2,a3,a4, var) ); } template inline detail::group1< detail::group6 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) { return detail::group1< detail::group6 > ( detail::group6 (a1,a2,a3,a4,a5, var) ); } template inline detail::group1< detail::group7 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) { return detail::group1< detail::group7 > ( detail::group7 (a1,a2,a3,a4,a5,a6, var) ); } template inline detail::group1< detail::group8 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) { return detail::group1< detail::group8 > ( detail::group8 (a1,a2,a3,a4,a5,a6,a7, var) ); } template inline detail::group1< detail::group9 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) { return detail::group1< detail::group9 > ( detail::group9 (a1,a2,a3,a4,a5,a6,a7,a8, var) ); } template inline detail::group1< detail::group10 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) { return detail::group1< detail::group10 > ( detail::group10 (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) ); } #ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST template inline detail::group1< detail::group2 > group(T1 a1, Var& var) { return detail::group1< detail::group2 > ( detail::group2 (a1, var) ); } template inline detail::group1< detail::group3 > group(T1 a1,T2 a2, Var& var) { return detail::group1< detail::group3 > ( detail::group3 (a1,a2, var) ); } template inline detail::group1< detail::group4 > group(T1 a1,T2 a2,T3 a3, Var& var) { return detail::group1< detail::group4 > ( detail::group4 (a1,a2,a3, var) ); } template inline detail::group1< detail::group5 > group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) { return detail::group1< detail::group5 > ( detail::group5 (a1,a2,a3,a4, var) ); } template inline detail::group1< detail::group6 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) { return detail::group1< detail::group6 > ( detail::group6 (a1,a2,a3,a4,a5, var) ); } template inline detail::group1< detail::group7 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) { return detail::group1< detail::group7 > ( detail::group7 (a1,a2,a3,a4,a5,a6, var) ); } template inline detail::group1< detail::group8 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) { return detail::group1< detail::group8 > ( detail::group8 (a1,a2,a3,a4,a5,a6,a7, var) ); } template inline detail::group1< detail::group9 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) { return detail::group1< detail::group9 > ( detail::group9 (a1,a2,a3,a4,a5,a6,a7,a8, var) ); } template inline detail::group1< detail::group10 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) { return detail::group1< detail::group10 > ( detail::group10 (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) ); } #endif //end- #ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST } // namespace io } // namespace boost #endif // BOOST_FORMAT_GROUP_HPP