public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29596]  New: overloaded function not found
@ 2006-10-25 21:44 again at gmx dot de
  2006-10-25 21:45 ` [Bug c++/29596] " again at gmx dot de
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:44 UTC (permalink / raw)
  To: gcc-bugs

Please find attached a sample program, which does not compile.

Unfortunately this program depends on boost.  I use the current boost version
1.33.1.  The include files "algorithm" and "iostream" are the ones belonging to
gcc-4.1.1.


-- 
           Summary: overloaded function not found
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: again at gmx dot de
 GCC build triplet: i686-pc-gnu-linux
  GCC host triplet: i686-pc-gnu-linux
GCC target triplet: i686-pc-gnu-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
@ 2006-10-25 21:45 ` again at gmx dot de
  2006-10-25 21:48 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from again at gmx dot de  2006-10-25 21:45 -------
Created an attachment (id=12493)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12493&action=view)
test.cpp (sample program that does not compile)

This program does not compile (commandline g++ test.cpp -o test)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
  2006-10-25 21:45 ` [Bug c++/29596] " again at gmx dot de
@ 2006-10-25 21:48 ` pinskia at gcc dot gnu dot org
  2006-10-25 21:50 ` again at gmx dot de
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-25 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-10-25 21:48 -------
Can you provide the preprocessed source which you can get via -save-temps and
it will be called something .ii.
Also you can provide the error message you get?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
  2006-10-25 21:45 ` [Bug c++/29596] " again at gmx dot de
  2006-10-25 21:48 ` pinskia at gcc dot gnu dot org
@ 2006-10-25 21:50 ` again at gmx dot de
  2006-10-25 21:51 ` again at gmx dot de
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from again at gmx dot de  2006-10-25 21:50 -------
Created an attachment (id=12494)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12494&action=view)
output of g++ test.cpp -o test


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (2 preceding siblings ...)
  2006-10-25 21:50 ` again at gmx dot de
@ 2006-10-25 21:51 ` again at gmx dot de
  2006-10-25 21:53 ` again at gmx dot de
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from again at gmx dot de  2006-10-25 21:51 -------
Created an attachment (id=12495)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12495&action=view)
output of Visual C++ .NET 2003 plus output of compiled program


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (3 preceding siblings ...)
  2006-10-25 21:51 ` again at gmx dot de
@ 2006-10-25 21:53 ` again at gmx dot de
  2006-10-25 21:57 ` again at gmx dot de
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from again at gmx dot de  2006-10-25 21:53 -------
test.ii produced by `g++ -v -save-temps test.cpp -o test' is to bug for
bugzilla -- you can find it here:
http://schlotter.org/pub/test.ii (1.2MB)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (4 preceding siblings ...)
  2006-10-25 21:53 ` again at gmx dot de
@ 2006-10-25 21:57 ` again at gmx dot de
  2006-10-27  9:04 ` again at gmx dot de
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-25 21:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from again at gmx dot de  2006-10-25 21:57 -------
Remark to test.cpp:23:
        std::cout << boost::lambda::_1 << '\n'

This should find the overloaded operator<< defined in boost/tuple_io.hpp.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (5 preceding siblings ...)
  2006-10-25 21:57 ` again at gmx dot de
@ 2006-10-27  9:04 ` again at gmx dot de
  2006-10-27  9:05 ` again at gmx dot de
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-27  9:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from again at gmx dot de  2006-10-27 09:04 -------
Created an attachment (id=12500)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12500&action=view)
test2.cpp (sample program that does not compile)

I managed to simplify the program.


-- 

again at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12493|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (6 preceding siblings ...)
  2006-10-27  9:04 ` again at gmx dot de
@ 2006-10-27  9:05 ` again at gmx dot de
  2006-10-27  9:06 ` again at gmx dot de
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-27  9:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from again at gmx dot de  2006-10-27 09:05 -------
Created an attachment (id=12501)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12501&action=view)
output of 'g++ test2.cpp -o test2'


-- 

again at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12494|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (7 preceding siblings ...)
  2006-10-27  9:05 ` again at gmx dot de
@ 2006-10-27  9:06 ` again at gmx dot de
  2006-10-27  9:07 ` again at gmx dot de
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-27  9:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from again at gmx dot de  2006-10-27 09:06 -------
Created an attachment (id=12502)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12502&action=view)
output of compiler shipped with MS Visual C++ 2005 Express Edition and program
output


-- 

again at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12495|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (8 preceding siblings ...)
  2006-10-27  9:06 ` again at gmx dot de
@ 2006-10-27  9:07 ` again at gmx dot de
  2006-10-27 11:04 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-27  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from again at gmx dot de  2006-10-27 09:06 -------
test2.ii produced by `g++ -v -save-temps test2.cpp -o test2' is to big for
bugzilla -- you can find it here:
http://schlotter.org/pub/test2.ii (1.1MB)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (9 preceding siblings ...)
  2006-10-27  9:07 ` again at gmx dot de
@ 2006-10-27 11:04 ` rguenth at gcc dot gnu dot org
  2006-10-27 11:05 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-27 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2006-10-27 11:04 -------
I believe the testcase is invalid.  EDG says:

test.cpp(5824): error: no instance of overloaded function
"boost::lambda::lambda_functor<T>::operator() [with
T=boost::lambda::placeholder<1>]" matches the argument list
            argument types are: (std::pair<int, int>)
            object type is: boost::lambda::placeholder1_type
      std::cout << (boost::lambda::_1)(std::make_pair(a, b)) << std::endl;
                   ^

compilation aborted for test.cpp (code 2)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (10 preceding siblings ...)
  2006-10-27 11:04 ` rguenth at gcc dot gnu dot org
@ 2006-10-27 11:05 ` rguenth at gcc dot gnu dot org
  2006-10-30 17:12 ` again at gmx dot de
  2006-10-30 17:27 ` again at gmx dot de
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-27 11:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2006-10-27 11:05 -------
Created an attachment (id=12503)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12503&action=view)
unincluded testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (11 preceding siblings ...)
  2006-10-27 11:05 ` rguenth at gcc dot gnu dot org
@ 2006-10-30 17:12 ` again at gmx dot de
  2006-10-30 17:27 ` again at gmx dot de
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-30 17:12 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]



------- Comment #13 from again at gmx dot de  2006-10-30 17:12 -------
(In reply to comment #11)
> I believe the testcase is invalid.

You're right, therefore I'm closing this bug.  The author of the Boost.Lambda
library, Jaakko Järvi, kindly pointed my to a section of the library
documentation, where it is written that arguments to lambda functions can't be
non-const rvalues[1].

The following patch corrects the test case:
--- test2.cpp.~1~       2006-10-27 11:02:14.000000000 +0200
+++ test2.cpp   2006-10-30 18:05:06.000000000 +0100
@@ -11,6 +11,8 @@
 int main()
 {
     int a = 1, b = 2;
-    std::cout << (boost::lambda::_1)(std::make_pair(a, b)) << std::endl;
+    std::cout
+        << (boost::lambda::_1)(boost::lambda::make_const(std::make_pair(a,
b)))
+        << std::endl;
     return 0;
 }

I don't know why it compiles cleanly on VC++, though.

Best regards
Christian

[1]
http://www.boost.org/doc/html/lambda/using_library.html#lambda.actual_arguments_to_lambda_functors


-- 

again at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/29596] overloaded function not found
  2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
                   ` (12 preceding siblings ...)
  2006-10-30 17:12 ` again at gmx dot de
@ 2006-10-30 17:27 ` again at gmx dot de
  13 siblings, 0 replies; 15+ messages in thread
From: again at gmx dot de @ 2006-10-30 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from again at gmx dot de  2006-10-30 17:26 -------
However, my initial testcase (attachment #12493) does still not compile, so it
seems I have simplified it wrongly.  I will check this back and reopen the bug
accordingly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29596


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-10-30 17:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25 21:44 [Bug c++/29596] New: overloaded function not found again at gmx dot de
2006-10-25 21:45 ` [Bug c++/29596] " again at gmx dot de
2006-10-25 21:48 ` pinskia at gcc dot gnu dot org
2006-10-25 21:50 ` again at gmx dot de
2006-10-25 21:51 ` again at gmx dot de
2006-10-25 21:53 ` again at gmx dot de
2006-10-25 21:57 ` again at gmx dot de
2006-10-27  9:04 ` again at gmx dot de
2006-10-27  9:05 ` again at gmx dot de
2006-10-27  9:06 ` again at gmx dot de
2006-10-27  9:07 ` again at gmx dot de
2006-10-27 11:04 ` rguenth at gcc dot gnu dot org
2006-10-27 11:05 ` rguenth at gcc dot gnu dot org
2006-10-30 17:12 ` again at gmx dot de
2006-10-30 17:27 ` again at gmx dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).