OSDN Git Service

clover: Fix clover::keys and ::values to deal with r-value references properly.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 14 Jan 2014 21:03:57 +0000 (22:03 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Jan 2014 15:48:37 +0000 (16:48 +0100)
commitbd6266622415fd24016f5c8e47c8b9cb654ea089
treeb6fc05d5215dfceda8b72238494dcc099e6c1d03
parent5662602ba050a43a01c1e06bdfeea83ec792852e
clover: Fix clover::keys and ::values to deal with r-value references properly.

Returning a reference is incorrect if the specified pair was a
temporary -- Instead of that, use decltype() to deduce the correct
return type qualifiers.  Fixes a crash in clCreateProgramWithBinary().

Reported-and-tested-by: "Dorrington, Albert" <albert.dorrington@lmco.com>
src/gallium/state_trackers/clover/util/functional.hpp