Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
760e603a
Commit
760e603a
authored
12 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
[doc]
fix \code blocks in forloop.hh [[Imported from SVN: r7021]]
parent
ae124b2a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/forloop.hh
+30
-30
30 additions, 30 deletions
dune/common/forloop.hh
with
30 additions
and
30 deletions
dune/common/forloop.hh
+
30
−
30
View file @
760e603a
...
...
@@ -13,6 +13,7 @@
namespace
Dune
{
#ifndef DOXYGEN
// GenericForLoop
// --------------
...
...
@@ -28,8 +29,6 @@ namespace Dune
:
public
Value
<
last
>
{};
// ForLoopHelper
// -------------
...
...
@@ -154,8 +153,9 @@ namespace Dune
}
};
}
}
// end namespace ForLoopHelper
#endif
/** \class ForLoop
...
...
@@ -176,33 +176,33 @@ namespace Dune
*
* Example of usage:
* \code
template<class Tuple>
struct PrintTupleTypes
{
template <int i>
struct Operation
{
template<class Stream>
static void apply(Stream &stream, const std::string &prefix)
{
stream << prefix << i << ": "
<< className<typename tuple_element<i, Tuple>::type>()
<< std::endl;
}
};
template<class Stream>
static void print(Stream &stream, const std::string &prefix)
{
// cannot attach on-the-fly in the argument to ForLoop<..>::apply() since
// that would yield an rvalue
std::string extended_prefix = prefix+" ";
stream << prefix << "tuple<" << std::endl;
ForLoop<Operation, 0, tuple_size<Tuple>::value-1>::
apply(stream, extended_prefix);
stream << prefix << ">" << std::endl;
}
};
*
template<class Tuple>
*
struct PrintTupleTypes
*
{
*
template <int i>
*
struct Operation
*
{
*
template<class Stream>
*
static void apply(Stream &stream, const std::string &prefix)
*
{
*
stream << prefix << i << ": "
*
<< className<typename tuple_element<i, Tuple>::type>()
*
<< std::endl;
*
}
*
};
*
template<class Stream>
*
static void print(Stream &stream, const std::string &prefix)
*
{
*
// cannot attach on-the-fly in the argument to ForLoop<..>::apply() since
*
// that would yield an rvalue
*
std::string extended_prefix = prefix+" ";
*
*
stream << prefix << "tuple<" << std::endl;
*
ForLoop<Operation, 0, tuple_size<Tuple>::value-1>::
*
apply(stream, extended_prefix);
*
stream << prefix << ">" << std::endl;
*
}
*
};
* \endcode
*
* \note Don't use any rvalues as the arguments to apply().
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment