Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
013eb467
Commit
013eb467
authored
Aug 17, 2013
by
Davis King
Browse files
Changed macro so it can be placed inside a class as well as at global scope
and in headers.
parent
c1545996
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dlib/algs.h
dlib/algs.h
+2
-2
No files found.
dlib/algs.h
View file @
013eb467
...
...
@@ -797,9 +797,9 @@ namespace dlib
template < typename T, returnT (T::*funct)args > \
struct _helper_##testname { typedef char type; }; \
template <typename T> \
char _has_##testname##_helper( typename _helper_##testname<T,&T::funct_name >::type ) { return 0;} \
static
char _has_##testname##_helper( typename _helper_##testname<T,&T::funct_name >::type ) { return 0;} \
template <typename T> \
_two_bytes_##testname _has_##testname##_helper(int) { return _two_bytes_##testname();} \
static
_two_bytes_##testname _has_##testname##_helper(int) { return _two_bytes_##testname();} \
template <typename T> struct _##testname##workaroundbug { \
const static unsigned long U = sizeof(_has_##testname##_helper<T>('a')); }; \
template <typename T, unsigned long U = _##testname##workaroundbug<T>::U > \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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