[Bug c++/29596] overloaded function not found

2006-10-30 Thread again at gmx dot de


--- 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.0 +0200
+++ test2.cpp   2006-10-30 18:05:06.0 +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



[Bug c++/29596] overloaded function not found

2006-10-30 Thread again at gmx dot de


--- 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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread again at gmx dot de


--- 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=12500action=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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread again at gmx dot de


--- 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=12501action=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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread again at gmx dot de


--- 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=12502action=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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread again at gmx dot de


--- 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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread rguenth at gcc dot gnu dot org


--- 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_functorT::operator() [with
T=boost::lambda::placeholder1] matches the argument list
argument types are: (std::pairint, 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



[Bug c++/29596] overloaded function not found

2006-10-27 Thread rguenth at gcc dot gnu dot org


--- 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=12503action=view)
unincluded testcase


-- 


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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread again at gmx dot de


--- 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=12493action=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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread pinskia at gcc dot gnu dot org


--- 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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread again at gmx dot de


--- 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=12494action=view)
output of g++ test.cpp -o test


-- 


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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread again at gmx dot de


--- 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=12495action=view)
output of Visual C++ .NET 2003 plus output of compiled program


-- 


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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread again at gmx dot de


--- 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



[Bug c++/29596] overloaded function not found

2006-10-25 Thread again at gmx dot de


--- 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