[Mesa-dev] [PATCH 1/3] clover: add a simple compat::pair
Francisco Jerez
currojerez at riseup.net
Wed Oct 8 10:00:37 PDT 2014
EdB <edb+mesa at sigluy.net> writes:
> std::pair is not c++98/c++11 safe
> ---
> src/gallium/state_trackers/clover/util/compat.hpp | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/util/compat.hpp b/src/gallium/state_trackers/clover/util/compat.hpp
> index 7305577..dd20ef0 100644
> --- a/src/gallium/state_trackers/clover/util/compat.hpp
> +++ b/src/gallium/state_trackers/clover/util/compat.hpp
> @@ -380,6 +380,12 @@ namespace clover {
> mutable vector<char> v;
> };
>
> + template<class T1, class T2>
Please use "typename" instead of "class" in template arguments for
consistency.
> + struct pair {
A default constructor would be useful here.
Other than that this looks good.
> + T1 first;
> + T2 second;
> + };
> +
> template<typename T>
> bool
> operator==(const vector_ref<T> &a, const vector_ref<T> &b) {
> --
> 2.1.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141008/9b827738/attachment.sig>
More information about the mesa-dev
mailing list