diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-04-19 13:47:18 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-04-19 13:47:18 +0200 |
commit | f19a492808d724a0f73e83fdf76ba7aa2aa3338c (patch) | |
tree | 41e66d4237ea57d2fbcc71744459b64640da581a /sigc++/reference_wrapper.h | |
parent | 815cdcf2941b3a11178a2b335aa066d83be627bb (diff) | |
download | sigc++-f19a492808d724a0f73e83fdf76ba7aa2aa3338c.tar.gz |
Use typename instead of class for all template parameters.
Apart from template template parameters, which must still be class
according to the C++14 standard:
http://stackoverflow.com/a/11311432/1123654
though g++ and clang++ actually already supporting using typename
instead by implementing N4051:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html
Diffstat (limited to 'sigc++/reference_wrapper.h')
-rw-r--r-- | sigc++/reference_wrapper.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sigc++/reference_wrapper.h b/sigc++/reference_wrapper.h index f6c2fb2..41f3661 100644 --- a/sigc++/reference_wrapper.h +++ b/sigc++/reference_wrapper.h @@ -22,32 +22,32 @@ namespace sigc { -template <class T_type> +template <typename T_type> struct unwrap_reference { using type = T_type; }; -template <class T_type> +template <typename T_type> struct unwrap_reference<std::reference_wrapper<T_type>> { using type = T_type&; }; -template <class T_type> +template <typename T_type> struct unwrap_reference<std::reference_wrapper<const T_type>> { using type = const T_type&; }; -template <class T_type> +template <typename T_type> T_type& unwrap(const std::reference_wrapper<T_type>& v) { return v; } -template <class T_type> +template <typename T_type> const T_type& unwrap(const std::reference_wrapper<const T_type>& v) { |