Consider the following code:
#include
int main()
{
std::cout << ({(void)123; "apple";}) << '\n'; // *
std::cout << ({(void)123; (const char*)"apple";}) << '\n';
}
The line marked * gives the following compilation error:
cd d:/home/3-autogc-nosplit/
make 2008/tests/t-22-bug.run
* Compilin
#include
#include
#include
#include
#include
#include
std::ostream& operator << (std::ostream& o, const std::pair p)
{
o << p.first << " " << p.second << std::endl;
return o;
}
std::ostream& operator << (std::ostream& o, const std::map&
map)
{
typename std::map::iterator it = map.
Thank you for taking the time to fix my bug. It becomes obvious when the
solution is presented to me.
On Friday, January 26, 2018 at 8:52:06 AM UTC+13, Richard Kettlewell wrote:
> writes:
> > std::ostream& operator << (std::ostream& o, const
> > std::map& map)
> > {
> >typename std::map::it
The following code generates a linker error:
#include
#include
#include
#include
#include
#include
#include
class Writer
{
public:
Writer& operator << (const char* s)
{
for (const char* ch = s; *ch != 0; ++ch)
{
printf("%c",*ch);
}
return *this;
}
On Tuesday, January 30, 2018 at 4:36:16 AM UTC+13, Richard Kettlewell wrote:
> "davin.pearson" writes:
>
> > The following code generates a linker error:
> [...]
>
> You’ve tried to explicitly instantiate a template, but got the syntax
> wrong. See
> https://gcc.gnu.org/onlinedocs/gcc/Template-In
Here is the location of my files:
http://davinpearson.com/binaries/map-20180403-100601.tar.gz
When I try to link map/map.cc it gives me the following
error message:
-*- mode: compilation; default-directory: "~/lisp++-projects/" -*-
Compilation started at Tue Apr 3 09:54:15
cd ~/lisp++-projects