Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
2fbc75f4
Commit
2fbc75f4
authored
Nov 24, 2016
by
Maximilien Colange
Browse files
New macro to downcast shared pointers.
* spot/misc/casts.hh: Add a macro down_pointer_cast.
parent
59523924
Changes
1
Hide whitespace changes
Inline
Side-by-side
spot/misc/casts.hh
View file @
2fbc75f4
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2015 Laboratoire de Recherche et Développement
// Copyright (C) 2011, 2015
-2016
Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
...
...
@@ -29,7 +29,13 @@
// on error, which the assert catches.
#if NDEBUG
# define down_cast static_cast
#
define down_cast static_cast
#else
# define down_cast dynamic_cast
#endif
#if NDEBUG
# define down_pointer_cast std::static_pointer_cast
#else
# define down_pointer_cast std::dynamic_pointer_cast
#endif
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment