Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
5d8a5ade
Commit
5d8a5ade
authored
Nov 20, 2014
by
Dan Albert
Committed by
Gerrit Code Review
Nov 20, 2014
Browse files
Options
Downloads
Plain Diff
Merge "Add a pre-C++11 constexpr compatibility macro."
parents
aa3e17e1
e4c649c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/utils/Compat.h
+11
-0
11 additions, 0 deletions
include/utils/Compat.h
with
11 additions
and
0 deletions
include/utils/Compat.h
+
11
−
0
View file @
5d8a5ade
...
...
@@ -43,6 +43,17 @@ static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset)
# define ZD_TYPE long
#endif
/*
* Needed for cases where something should be constexpr if possible, but not
* being constexpr is fine if in pre-C++11 code (such as a const static float
* member variable).
*/
#if __cplusplus >= 201103L
#define CONSTEXPR constexpr
#else
#define CONSTEXPR
#endif
/*
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
...
...
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