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
Tobias Leibner
dune-common
Commits
f7b0fede
Commit
f7b0fede
authored
9 years ago
by
Marco Agnese
Committed by
Christoph Grüninger
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add deprecation warnings
parent
725ab606
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/typetraits.hh
+9
-11
9 additions, 11 deletions
dune/common/typetraits.hh
with
9 additions
and
11 deletions
dune/common/typetraits.hh
+
9
−
11
View file @
f7b0fede
...
...
@@ -32,9 +32,9 @@ namespace Dune
* unqualified types.
*/
template
<
typename
T
>
struct
ConstantVolatileTraits
struct
DUNE_DEPRECATED_MSG
(
"Use <type_traits> instead!"
)
ConstantVolatileTraits
{
enum
{
enum
DUNE_DEPRECATED_MSG
(
"Use std::is_volatile/std::is_const instead!"
)
{
/** @brief True if T has a volatile specifier. */
isVolatile
=
std
::
is_volatile
<
T
>::
value
,
/** @brief True if T has a const qualifier. */
...
...
@@ -42,11 +42,11 @@ namespace Dune
};
/** @brief The unqualified type. */
typedef
typename
std
::
remove_cv
<
T
>::
type
UnqualifiedType
;
typedef
DUNE_DEPRECATED_MSG
(
"Use std::remove_const instead!"
)
typename
std
::
remove_cv
<
T
>::
type
UnqualifiedType
;
/** @brief The const type. */
typedef
typename
std
::
add_const
<
UnqualifiedType
>::
type
ConstType
;
typedef
DUNE_DEPRECATED_MSG
(
"Use std::add_const instead!"
)
typename
std
::
add_const
<
UnqualifiedType
>::
type
ConstType
;
/** @brief The const volatile type. */
typedef
typename
std
::
add_cv
<
UnqualifiedType
>::
type
ConstVolatileType
;
typedef
DUNE_DEPRECATED_MSG
(
"Use std::add_cv instead!"
)
typename
std
::
add_cv
<
UnqualifiedType
>::
type
ConstVolatileType
;
};
/** @brief Tests wether a type is volatile. */
...
...
@@ -88,14 +88,13 @@ namespace Dune
* @tparam To type you want to obtain
*/
template
<
class
From
,
class
To
>
class
Conversion
struct
DUNE_DEPRECATED_MSG
(
"Use std::is_convertible/std::is_same instead!"
)
Conversion
{
public:
enum
{
enum
DUNE_DEPRECATED_MSG
(
"Use std::is_convertible/std::is_same instead!"
)
{
/** @brief True if the conversion exists. */
exists
=
std
::
is_convertible
<
From
,
To
>::
value
,
/** @brief Whether the conversion exists in both ways. */
isTwoWay
=
exists
&&
std
::
is_convertible
<
To
,
From
>::
value
,
isTwoWay
=
std
::
is_convertible
<
From
,
To
>::
value
&&
std
::
is_convertible
<
To
,
From
>::
value
,
/** @brief True if To and From are the same type. */
sameType
=
std
::
is_same
<
From
,
To
>::
value
};
...
...
@@ -108,9 +107,8 @@ namespace Dune
* @tparam Derived type you want to test
*/
template
<
class
Base
,
class
Derived
>
class
DUNE_DEPRECATED_MSG
(
"Use std::is_base_of instead!"
)
IsBaseOf
struct
DUNE_DEPRECATED_MSG
(
"Use std::is_base_of instead!"
)
IsBaseOf
{
public:
enum
DUNE_DEPRECATED_MSG
(
"Use std::is_base_of instead!"
)
{
/** @brief True if Base is a base class of Derived. */
value
=
std
::
is_base_of
<
Base
,
Derived
>::
value
...
...
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