http://llvm.org/bugs/show_bug.cgi?id=14036

David Blaikie <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected],
                   |                            |[email protected]
          Component|Frontend                    |All Bugs
            Version|trunk                       |unspecified
         Resolution|                            |INVALID
         AssignedTo|unassignedclangbugs@nondot. |[email protected]
                   |org                         |
            Product|clang                       |libc++

--- Comment #2 from David Blaikie <[email protected]> 2012-10-06 13:31:54 CDT 
---
Pretty sure this is by design:

__bind<std::__1::uniform_int_distribution<int> &,
std::__1::linear_congruential_engine<unsigned int, 48271, 0, 2147483647>
      &>
to 'func' (aka 
__bind<std::__1::uniform_int_distribution<int>,     
std::__1::linear_congruential_engine<unsigned int, 48271, 0,
      2147483647>>

Notice that the first template type argument to bind is a reference in the
first case (since you called bind with an lvalue, 'dist') and an rvalue in the
second (since you used declval<distribution<int>>()). To fix this I believe you
could use declval<std::uniform_int_distribution<int>&>().

[+Howard just in case he has a differing opinion]

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to