public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vincenzo Innocente <vincenzo.innocente@gmail.com>
To: Arbol One <arbolone@hotmail.ca>
Cc: gcc-help@gcc.gnu.org
Subject: Re: is it safe to generate profiles from multiple concurrent processes?
Date: Wed, 25 Jun 2014 16:57:00 -0000	[thread overview]
Message-ID: <3B573B50-0C14-4BDC-AA9B-B9EF401EA3E3@gmail.com> (raw)
In-Reply-To: <BLU181-DS251C2A040E649E15B3A657BA190@phx.gbl>

> std::fstream::in is not a type 

the error is indeed 
error: ‘in’ in ‘std::fstream {aka class std::basic_fstream<char>}’ does not name a type

btw  you have a spurious “;” before "|"

I think you are confusing the usage of “using” and “auto” keywords

this compiles

#include <fstream>
int main () {
auto && my_read = std::fstream::in;
std::fstream fs;
fs.open ("test.txt", my_read | std::fstream::out | std::fstream::app);
fs << " more lorem ipsum";
fs.close();
return 0;
}


On 25 Jun, 2014, at 3:13 PM, Arbol One <arbolone@hotmail.ca> wrote:

> #include <fstream>
> int main () {
> using my_read = std::fstream::in; //<== Error: expected type-specifier
> std::fstream fs;
> fs.open ("test.txt", my_read | std::fstream::out; | std::fstream::app);
> fs << " more lorem ipsum";
> fs.close();
> return 0;
> }

      parent reply	other threads:[~2014-06-25 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D1DD18C-D9D8-4135-9CB5-4E3CDACBF0F1@gmail.com>
2014-06-25 12:40 ` Vincenzo Innocente
2014-06-25 12:58   ` Markus Trippelsdorf
2014-06-25 13:52     ` Arbol One
2014-06-25 15:23       ` Jonathan Wakely
2014-06-25 16:57       ` Vincenzo Innocente [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B573B50-0C14-4BDC-AA9B-B9EF401EA3E3@gmail.com \
    --to=vincenzo.innocente@gmail.com \
    --cc=arbolone@hotmail.ca \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).