Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #342

user-defined literals and macros

From cryptooctoploid@gmail.com
Newsgroups comp.std.c++
Subject user-defined literals and macros
Date 2011-10-30 11:09 -0700
Organization http://groups.google.com
Message-ID <21848168.4112.1319981727733.JavaMail.geo-discussion-forums@yqbl36> (permalink)

Show all headers | View raw


Consider:
  % cat liter.cpp
#define BAR "foo"
int main()
{
   char *foobar("foo/"BAR);
}

  % g++ liter.cpp -std=gnu++0x
liter.cpp: In function ‘int main()’:
liter.cpp:4:16: error: unable to find user-defined string literal operator ‘operator"" BAR’

Is this the expected behavior?


-- 
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextNext in thread | Find similar


Thread

user-defined literals and macros cryptooctoploid@gmail.com - 2011-10-30 11:09 -0700
  Re: user-defined literals and macros Johannes Schaub <schaub.johannes@googlemail.com> - 2011-10-31 11:10 -0700
  Re: user-defined literals and macros David Krauss <potswa@gmail.com> - 2011-10-31 11:11 -0700
  Re: user-defined literals and macros Ed Smith-Rowland <3dw4rd@verizon.net> - 2011-10-31 11:11 -0700
    Re: user-defined literals and macros Ed Smith-Rowland<3dw4rd@verizon.net> - 2011-11-01 11:14 -0700
  Re: user-defined literals and macros Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-10-31 11:12 -0700

csiph-web