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
f4cf2a09
Commit
f4cf2a09
authored
14 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
remove deprecated class IsTrue
[[Imported from SVN: r6142]]
parent
14fbdfee
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/static_assert.hh
+1
-34
1 addition, 34 deletions
dune/common/static_assert.hh
with
1 addition
and
34 deletions
dune/common/static_assert.hh
+
1
−
34
View file @
f4cf2a09
...
...
@@ -3,45 +3,12 @@
#ifndef DUNE_STATIC_ASSERT_HH
#define DUNE_STATIC_ASSERT_HH
#include
"deprecated.hh"
/**
* @addtogroup Common
*
* @{
*/
/**
\brief (DEPRECATED) Helper template so that compilation fails if condition is not true.
\deprecated Use dune_static_assert instead.
If the condition is true a static function yes is available, othewise the
only function available is no().
Example for compile time check whether two types are the same:
\code
IsTrue<is_same<int,int>::value>::yes(); //
IsTrue<is_same<bool,int>::value>::yes(); // false, will trigger a compile time error
\endcode
A test that trigger a compile time error if condition is true:
\code
IsTrue<condition>::no()
\endcode
*/
template
<
bool
condition
>
struct
IsTrue
{
static
void
no
()
DUNE_DEPRECATED
{};
};
template
<
>
struct
IsTrue
<
true
>
{
static
void
yes
()
DUNE_DEPRECATED
{};
};
#if not HAVE_STATIC_ASSERT
// Taken from BOOST
//
...
...
@@ -132,7 +99,7 @@ namespace Dune {
typedef void FrobnicateType;
};
* \endcode
* This will trigger dune_static_assert() as soon as the compiler read the
* This will trigger dune_static_assert() as soon as the compiler read
s
the
* definition for the Traits template, since it knows that "false" can
* never become true, no matter what the template parameters of Traits are.
* As a workaround you can use AlwaysFalse: replace <tt>false</tt> by
...
...
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