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
505db0ab
Commit
505db0ab
authored
4 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate DUNE_UNUSED
No deprecation warning will be shown.
parent
acc3cf1a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!946
Feature/maybe unused replace dune unused
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+6
-0
6 additions, 0 deletions
CHANGELOG.md
dune/common/unused.hh
+9
-1
9 additions, 1 deletion
dune/common/unused.hh
with
15 additions
and
1 deletion
CHANGELOG.md
+
6
−
0
View file @
505db0ab
...
...
@@ -86,6 +86,12 @@
`
[[deprecated]]
` but be aware that it is no drop-in replacement,
as it must be sometimes placed at different position in the code.
- The macros `
DUNE_UNUSED
` is deprecated and will be removed after
Dune 2.8. Use C++17's attribute `
[[maybe_unused]]
` instead, but be
aware that it is no drop-in replacement, as it must be sometimes
placed at different position in the code.
The use of `
DUNE_UNUSED_PARAMETER
` is discouraged.
# Release 2.7
- Added fallback implementation to C++20 feature: `
std::identity
`.
...
...
This diff is collapsed.
Click to expand it.
dune/common/unused.hh
+
9
−
1
View file @
505db0ab
...
...
@@ -12,14 +12,22 @@
//! A macro for marking variables that the compiler mistakenly flags as unused, which sometimes happens due to templates.
/**
* \ingroup CxxUtilities
* \deprecated Use C++17's \code[[maybe_unused]]\endcode instead. This
* macro will be removed after Dune 2.8. Be aware that it must be
* sometimes placed at a different position in the code.
*/
#define DUNE_UNUSED
#else
#define DUNE_UNUSED __attribute__((unused))
#endif
/// A macro to mark intentionally unused function parameters with.
/**
* A macro to mark intentionally unused function parameters with.
*
* If possible use C++17's \code[[maybe_unused]]\endcode instead.
* Due to a bug prior to GCC 9.3 it cannot be used for the first
* argument of a constructor (bug 81429).
*
* \ingroup CxxUtilities
*/
#define DUNE_UNUSED_PARAMETER(parm) static_cast<void>(parm)
...
...
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