Problem with variadic macros, Forte 6U2

The following code demonstrates a problem with namespace qualifiers used in variadic macros. The workaround (if you want to call it that) is to use triple colons as the scope resolution operator inside certain cases of variadic macros. The following piece of very contrived code demonstrates the problem. If you look at preproccessed output, its pretty clear that the variadic macro eats colons.
unix experiments/C++/badmacros> cat badmacros.cpp
/*************** badmacros.cpp *******************/
#define INTERFACE(ifc) virtual public ifc
#define EXTENDS(...) __VA_ARGS__
namespace foo {
namespace bar {
   class Interface {};
}//namespace bar
}//namespace foo
#if !defined(HACK_TO_FIX)
   class DerivedInterface : EXTENDS( INTERFACE(::foo::bar::Interface) )
#else
   class DerivedInterface : EXTENDS( INTERFACE(:::foo:::bar:::Interface) )  
#endif
int main(int argc, char* argv[]){}
/*************** badmacros.cpp *******************/unix experiments/C++/badmacros> CC badmacros.cpp
"badmacros.cpp", line 18: Error: Identifier expected instead of ":".
1 Error(s) detected.
unix experiments/C++/badmacros> CC -DHACK_TO_FIX badmacros.cpp
unix experiments/C++/badmacros>

OK - that is good to hear. OTOH, I think I've found another one. The following code builds properly whether or not DEFINE_IN_CLASS_BODY is set on both g++ 3.0.1 and on the online comeau C++ compiler. However, in Forte 6U2, if DEFINE_IN_CLASS_BODY is not set, compilation fails.
unix experiments/C++/over_template> cat over_template.cpp
#if defined(DEFINE_IN_CLASS_BODY)
class Factory {
public:
   void * create() const {
      return new int;
   template<typename T> T * create() const {
      return reinterpret_cast<T*>(create());
#else
class Factory {
public:
   void * create() const;
   template<typename T> T * create() const;
inline void * Factory::create() const {
   return new int;
template<typename T> inline T * Factory::create() const {
   return reinterpret_cast<T*>(create());
#endif
int main(int argc, char * argv[]){}unix experiments/C++/over_template> \rm -rf SunWS_cache/; CC over_template.cpp
"over_template.cpp", line 30: Error: Factory::create() const already had a body defined.
1 Error(s) detected.
unix experiments/C++/over_template> \rm -rf SunWS_cache/; CC -DDEFINE_IN_CLASS_BODY over_template.cpp
This last compile works fine. Using Forte6U2, all the latest patches installed.

Similar Messages

  • Problems with 2011 Kia Forte hands free following upgrade to ios 7.1

    I have had nothing but problems with the Bluetooth hands free feature in my 2011 Kia Forte ever since I upgraded to IOS7.1. I have removed and repaired the device to no avail. I have discovered the following behavior through the troubleshooting I have done so far:
    If I use hands free to dial, the phone will dial but nothing is heard on either end of the call. If I switch the audio feed from the car to iPhone, both parties can then talk, but as soon as I switch it back to the car there is silence on both ends. I have determined that streaming Bluetooth audio still works in my car in spite of the hands free issues. I can switch audio back and forth during the entirety of the call and as long as audio is set to either iPhone or speaker it works, it just won't work when the car is selected.
    I have checked and there is no new firmware available from Kia for my vehicle's Bluetooth.
    Any thoughts?

    Same problem for me after the update. No matter what movie I try to download, it stalls halfway.  Interestingly, could be a wider iTunes issue as I ended up with the same problem trying to download movies to my MacBook Air.

  • Problem with files from Forte

    I've been programming using the lateste J2SE version of Forte. When I've tried turning in my java and class files, my professor was unable to use them. Is there a reason why the java file won't work in JPadPro or on another IDE?

    I don't think so, Are you sure?
    Using bbritta's example of "package something;", all of the files should be in a directory named \something\ or a subdirectory of it.
    To execute the program from DOS, go to the parent directory of /something/ and enter: java something.<yourclassname>
    This works for me with programs created in S1S. If you're using some special S1S classea and it says some are missing, you'll have to add them.
    Can't help with getting it to work in another IDE.

  • Problem with AppletViewer in Forte

    Hi,
    my applet runs fine when the 1.4 appletviewer is called from the command line, it also runs fine when executing the forte-generated html-file from forte, but the appletviewer won't start from forte (applet debugging and applet execution set)
    when i try to execute my applet from forte, the process starts, runs 1 or two seconds, and terminates without showing any messages (errormessages).
    any ideas? thanks in advance...

    J2ME forte integration destroyed something in my forte-projects-folder. Uninstall was not enough, i had to rename this folder and create a new one.

  • Patch problem with Forte 6U2?

    I just installed all of the patches currently up at access1 for Forte 6U2 on solaris 8. When I rebuilt, I got the following
    Error: The destructor name must match the class name.
    while building the following code fragment:
       template<typename T>
       class table
          class node {
          public:
                   explicit
             node(const T&);
             ~node();
                  // ... other stuff
          // ... other stuff
       // much later in same header
              template<typename T>
              inline
        table<T>::node::~node()
        }The error occurs on the out-of-body inline delcaration of table<T>::node::~node() above.
    This code compiled fine with previous patches, and works correctly under gcc3.1 and gcc3.2.
    CC -v gives me:
    CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-10 2002/09/16
    Any information would be appreciated.
    Thanks.

    I think you and I have different definitions of "status".
    Search Failed == Not Fixed seems like a pretty coarse status measurement to me, and a poor interface to boot. If I had a support contract, would I actually be able to read a description of the bug as it is currently filed from suns perspective? What could possibly be so expensive about giving read access to an existing defect database ( esp. when compared with the cost of fixing defects ) that you need to charge to underwrite it? Does it not strike you as almost punitive to require payment from those users who found, tested, and submitted defects for the right to track the status of those defects? Please, please, please explain the rationale behind this to me. I find the whole approach infuriating, unnecessarily opaque, and counterproductive.
    Am I interested in finding out that the defect is fixed. Yes. But what is far more important to me is to know that you are actually doing something about it. This critical piece of information is sorely lacking in the current system, especially given the number of defects I have submitted, which were assigned bug IDs, but which have never been fixed in any patch.
    http://sunsolve.sun.com is the website you could check
    the status of the bug. Search for the bug ID, if it's
    not found, then the patch for it is not released.
    Otherwise, you will see the patch ID. I don't think
    you need to have contract to surf the website.
    - Rose

  • Compatibility problem with macro media flash active control

    I am getting a message on my screen "compatibility problem with macro media flash active control, it isnt compatible with my version of windows (vista).  How can this be fixed?  why am I suddenly getting it now?  I have the latest Adobe flash player installed.
    Trisha

    the latest flash is probably the problem... it's seems that the latest flash has been causing a boat load of issues. i did a system restore to undo the flash and mozilla upgrades and it's still crashing but not as bad as it was with the upgrades.

  • [SOLVED?] Problem with multi key macros in emacs

    I recently made the switch from gentoo to arch, for the most part everything is up and working. The only thing I am having a problem with is GNU emacs, for some reason i can't use some macros that need more than 2 keys to be pressed. For example M-< will not work but for some reason C-_ will. I haven't got the faintest clue as to what the problem is. I am running xfce and using the us keyboard layout. If i run emacs outside of X than all the macros work fine. Any ideas?
    Thanks in advance.
    Last edited by flarkis (2010-03-01 22:57:24)

    seeing as this problem persists in both the terminal and gui versions i don't think that is possible. I also tried running both versions in twm to see if anything was different. The keys still aren't seen correctly but this time they are replaced with random characters that are not part of my keymap. An X11 problem or keyboard configuration problem?
    <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
    <deviceinfo version="0.2">
    <device>
    <match key="info.capabilities" contains="input.keymap">
    <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>
    <match key="info.capabilities" contains="input.keys">
    <merge key="input.xkb.rules" type="string">base</merge>
    <!-- If we're using Linux, we use evdev by default (falling back to
    keyboard otherwise). -->
    <merge key="input.xkb.model" type="string">keyboard</merge>
    <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
    string="Linux">
    <merge key="input.xkb.model" type="string">evdev</merge>
    </match>
    <merge key="input.xkb.layout" type="string">us</merge>
    <merge key="input.xkb.variant" type="string" />
    </match>
    </device>
    </deviceinfo>
    Last edited by flarkis (2010-02-25 03:28:08)

  • Forte 6u2 mutex creation problem when debug

    Hi,
    I want to debug my software using forte 6u2 graphical environment but it does not work. When debugging in the graphical env, my software is not able to create some mutex and I can't even step in the code. If I use dbx command line, it works perfectly. Anybody knows what the problem is ?
    Thanks,
    P.S. My software is pretty huge and uses many dynamic lib.

    Can you supply some more details?
    When you say your program can't create a mutex, what does that mean? Do you
    mean that you are calling pthread_mutex_init() and the function is returning
    an error?
    When you say you can't "step" in the code, what does that mean?
    1. you stop somewhere
    2. you hit the "step" button
    3. then what happens?
    a) program continues without stopping at the line you wanted it to?
    b) program doesn't seem to advance anywhere, as if step command was ignored?
    c) program crashes?
    d) debugger crashes?
    Please explain in more detail.
    --chris

  • Problem with Macro Running When Closing a Document

    Hi Folks;
    I'm trying to develop a Visio macro that runs when I close a document, but I've run into a snag...
    The problem is that the code below only works when I press the 'X' in the corner of the document to close it.  If I try to close it using
    File -> Close, I get the error "Run Time Error -2032464741 (86db0c9b) An exception occurred", and the debugger highlights the first 'Application' line.
    I need the code to work regardless of the close operation, and I'm not sure how to make that happen (since I assumed it should've work the same regardless).
    Private Function Document_QueryCancelDocumentClose(ByVal doc As IVDocument) As Boolean
    Document_QueryCancelDocumentClose = True
    If MsgBox("If you made changes, did you UPDATE the Diagram History? (Select Yes if no changes were made)", vbYesNo + vbCritical + vbDefaultButton2, "Warning - DIAGRAM HISTORY UPDATED?") = vbYes Then
    Application.ActiveDocument.Pages.ItemU("Diagram").Layers.Item("Warning").CellsC(4) = 1
    Document_QueryCancelDocumentClose = False
    Else
    Document_QueryCancelDocumentClose = True
    End If
    End Function
    Any help would be appreciated.
    Zang

    I'm betting your typical "try this" response is not what anyone wants.  But since you've chimed in... my problems with the Visio event model are PLENTY.  Print and save events that cannot be cancelled, document close that doesn't fire on application
    close, and Application.BeforeDocumentSaveAs that occurs WAY AFTER the document has been saved are just a few.  (Did Microsoft even test these events??)  The official Microsoft response to ALL of this was, in a word, "repurpose" it. Essentially they
    advocate completely rewriting the actual Save and Print portions of the interface and corresponding logic in Visio by intercepting keystrokes and redirecting ribbon extensibility idMso ="FileSave" and idMso ="FileSaveAs" commands to your own methods. 
    To quote paid support:
    "You may repurpose Save command in Visio as suggested in my previous email, however there is a design limitation that does not allow repurposing Print backstage button.
    In order to achieve Visio Print repurpose, the workaround is to hide the print back stage altogether and plug with custom backstage ribbon xml."
    We now also repurpose idMso="FilePrintQuick", idMso="FilePrintPreview", and idMso="FileClose" customUI commands, but we still had to use the logic above to catch save before closing. 
    Valid methods that work while Visio is active will fail within Application close.  IT IS A BUG IN VISIO.  That is what this post is about.

  • Problem with Macro Mode on 808 for close up pictur...

    -The 808 have much better video and picture quality both in normal mode and in macro mode than the N8, but not in picture macro mode!
    I took several pictures of very small things using the 808 with full resolution including extremely small text, but in full resolution you can not zoom in, and then you can not get closer because it would get impossible to focus. Then I took several pictures of the same very small things using the 8MP PUREVIEW and zoomed in. Then opened the pictures on my computer using 100% magnification, and the pictures were of the exact same size! And quality wise the pictures taken in 8MP PUREVIEW were slightly better, and in 8MP you see better what you are photographing because of the zoom. So, the software in the case of macro mode doesn’t use the potential of the huge sensor, and that means so much MP FOR NOTHING!
    -Then I had an idea. The N8 has got zoom when in maximum resolution contrary to the 808, and the N8 has got 12MP vs the only 8MP of the 808. So I took several pictures of the same small things including extremely small text, using both the N8 with full zoom at 12MP and the 808 with full zoom at only 8MP. And then opened the pictures on my computer using 100% magnification, and obviously the pictures from the N8 were a little bigger because the N8 has got more MP. But the 808 was lucky, because even with the smaller pictures, the quality was just slightly better, just slightly, so overall you could see a little better what the words were in the case of text pictures than the N8.
    -In conclusion, the 808 has got a way much bigger sensor, but the software in the case of macro pictures does not take advantage of the bigger sensor of the 808. It should be possible to zoom in when in full resolution, or at least it should be possible to use the pureview mode with zooming capabilities at 12MP at least. Or/and it should be possible to focus closer to the small things.

    What kind of 49mm Close-up lens did you use or prefer?
    but its not convenient to carry this everywhere you go unless you are a photographer.
    How do I take macro picture of small worm inside a plastic transparent container? Its very challanging to focus with Nokia 808. I cannot beat my friend who's using Samsung GS 3 can focus easily on droplets on a plastic bottle because there is no such restriction of 15cm distance away of subject. ~really hope got manual focus ~dreaming of it~
    Nokia 808 still give the best sharpness details for far shots but macro with poor focusing and restriction from the software which worry the most for me. If you give me N8 or n808 for macro I will choose N8 together with some macro lens to boost it more closer like an microsope.

  • Forte 6U2 - patch confusion

    While trying to update our compiler to the newest patch set, I ran into the following problem. From access1, patch 111683-14 requires patch 111690-10 or greater to be installed. 111690-10 is not listed on access1 as a patch. When I tried to install 111690-10 after getting it from sunsolve, the patch installation failed, saying that "One or more patch packages included in 111690-10 are not installed on this system."
    111690-10 appears to be an update to the Fortran subcomponent of Forte 6U2, (I guess contained in the Hi-perf package), which we did not install, because we don't use fortran. But this is sort of a problem, because it means that we can't install the latest debugger patch.
    Any suggestions?

    You can find 111690-10 from access1 at:
    http://access1.sun.com/patch.public/cgi-bin/show_list.cgi/wrk/Forte_Fortran_6u2_SPARC
    With the next dbx patch release, the dependency problem will be removed. Please wait until the next dbx patch comes out.
    - Rose

  • Problems with ListViews Drag and Drop

    I'm surprised that there isn't an Active X control that can do this more
    easily? Would
    be curious to find out if there is - although we aren't really embracing the
    use of
    them within Forte because it locks you into the Microsoft arena.
    ---------------------- Forwarded by Peggy Lynn Adrian/AM/LLY on 02/03/98 01:33
    PM ---------------------------
    "Stokesbary, Michael" <[email protected]> on 02/03/98 12:19:52 PM
    Please respond to "Stokesbary, Michael" <[email protected]>
    To: "'[email protected]'" <[email protected]>
    cc:
    Subject: Problems with ListViews Drag and Drop
    I am just curious as to other people's experiences with the ListView
    widget when elements in it are set to be draggable. In particular, I am
    currently trying to design an interface that looks a lot like Windows
    Explorer where a TreeView resides on the left side of the window and a
    ListView resides on the right side. Upon double clicking on the
    ListView, if the current node that was clicked on was a folder, then the
    TreeView expands this folder and the contents are then displayed in the
    ListView, otherwise, it was a file and it is brought up in Microsoft
    Word. All this works great if I don't have the elements in the ListView
    widget set to be draggable. If they are set to be draggable, then I am
    finding that the DoubleClick event seems to get registered twice along
    with the ObjectDrop event. This is not good because if I double click
    and the current node is a folder, then it will expand this folder in the
    TreeView, display the contents in the ListView, grab the node that is
    now displayed where that node used to be displayed and run the events
    for that as well. What this means, is that if this is a file, then Word
    is just launched and no big deal. Unfortunately, if this happens to be
    another directory, then the previous directory is dropped into this
    current directory and a recursive copy gets performed, giving me one
    heck of a deep directory tree for that folder.
    Has anybody else seen this, or am I the only lucky one to experience.
    If need be, I do have this exported in a .pex file if anybody needs to
    look at it more closely.
    Thanks in advance.
    Michael Stokesbary
    Software Engineer
    GTE Government Systems Corporation
    tel: (650) 966-2975
    e-mail: [email protected]

    here is the required code....
    private static class TreeDragGestureListener implements DragGestureListener {
         public void dragGestureRecognized(DragGestureEvent dragGestureEvent) {
         // Can only drag leafs
         JTree tree = (JTree) dragGestureEvent.getComponent();
         TreePath path = tree.getSelectionPath();
         if (path == null) {
              // Nothing selected, nothing to drag
              System.out.println("Nothing selected - beep");
              tree.getToolkit().beep();
         } else {
              DefaultMutableTreeNode selection = (DefaultMutableTreeNode) path
                   .getLastPathComponent();
              if (selection.isLeaf()) {
              TransferableTreeNode node = new TransferableTreeNode(
                   selection);
              dragGestureEvent.startDrag(DragSource.DefaultCopyDrop,
                   node, new MyDragSourceListener());
              } else {
              System.out.println("Not a leaf - beep");
              tree.getToolkit().beep();
    }

  • Problems with ATI Radeon HD 2600, electrical interference or flickering pix

    Problems with ATI Radeon HD 2600, electrical interference or flickering pixels
    I have a Macro 8 core purchased just 4 months ago with the ATI Radeon HD 2600. Just started getting what looks like electrical interference or flickering pixels all over the screen. It gets worse and worse to the point where i see and cant work then clears up for an hour and then comes back.
    If I change the resolution from 1680x1050 to 1600x1200 everything looks fine and the problem goes away.
    Monitor works fine on two other computers, driver is up to date.
    Would like to upgrade at some point just disappointed that I’m already having problems.
    Any suggestions would be very helpful, in the mean time I’ll searching the forums.
    Thanks,

    When you called Applecare or went to a Genius bar were they of no help?

  • Problems with codepage after refreshing data from XML

    Hello,
    I've created a dashboard with XML connection.
    XML file with new data is created via macro in INPUT.xls Excel file. This INPUT.xls file was created through exporting spreadsheet from Xcelsius and then adding a macro to it, so text data should be this same codepade. Generated XML through macro have no errors and Flash file gets numeric data with no problems.
    But there is other problem with text's codepage. After reload there are some unidentified symbols in place of polish alphabet letters.
    What should I do to make it right? Is this a problem with codepage or something else?
    [Dashboard Before Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwo3sxZI/AAAAAAAAA_g/mkBiDdM4Gi4/s640/before_refresh.JPG]
    [Dashboard After Refresh|http://lh4.ggpht.com/_Q8NK6X6PPLg/TGkLwSx9fHI/AAAAAAAAA_c/3UeM2Gd3HvA/s640/after_refresh.JPG]
    If you have any idea hot to fix it, please let me know.
    Best regards,
    Bart Dlug

    Hello,
    I have header in my XML as follows:
    <?xml version="1.0" encoding="Windows-1250"?>
    Only then my XML file is displayed correctly in Internet Explorer preview. When I chagne it to UTF-8 I get some errors.
    [XML with windows-1250 codepage|http://lh3.ggpht.com/_Q8NK6X6PPLg/TGkUakDHjlI/AAAAAAAAA_o/lLlJFMcSaFQ/s800/codepage1250.JPG]
    [The same XML with UTF-8|http://lh5.ggpht.com/_Q8NK6X6PPLg/TGkUa8k4vyI/AAAAAAAAA_s/tdcZNqu7-i0/s800/codepage-UTF8.JPG]
    Error message means: Invalid character was found in text content. Error during processing resourcse file:///
    As I wrote before, my data is generated via macro in Excel, so I supose my data in this file has windows default codepage. Am I right?
    Do you think that I problem is XML file?
    Best regards,
    BD

  • Problem with the new server UCS C220 for set IP to CIMC

    Hi
    We’ve a problem with the new server UCS C220.
    We bought two servers UCS C220 M3 for CallManager 8.6 with High Availability.
    When we turn on the server during the boot and when it tells us, oppress F8 to enter at the CIMC and set the IP. But it never enters at the CIMC.
    Then, we configure our DHCP server and our switch, we connect the three gigabyte ports to our switch to give him an IP to the CIMC, so and then can enter via browser, but neither works.
    Note. The dedicated management NIC does not link, the other two ports do make link.
    What do you suggest to put an IP to CIMC and start installing our applications?
    regards

    You may have noticed that there is no DVD rom on the c220. What you need to do is:
    Login into the CIMC from your browser
    Luanch the KVM
    Insert the VMware DVD in your machines drive
    On the KVM pop up there should be a tab to mount the drive, after mounting it click on Macros and choose ctrl_alt+delete to restart.
    After the VMware OS installs press F2 to enter IP.
    Browse to the VMware ip to download the Vsphere client
    Open the Vsphere client, enter the ip of the vmware and the username will be root and no password if you did not set one.
    You can now upload OVA templates or manually create virtua machine from this enviroment.
    Hope this help

Maybe you are looking for

  • HOW TO GET MORE SPACE ON MY MAC

    Anybody have an idea how to free space of my mac.i bought new external hard drive and move most of my folder with music films and document in it.after moving i deleted them from my laptop then emtpy the trash,but after doing this,i still dont get fre

  • Some questions related to site studio 10gR4

    Hi everyone We are developing a solution using UCM, and I have couple of questions regarding the usage of the site studio 10gR4. It will be really great if any one of you can either answer or point me to the rite document/webpage where I can get thes

  • Audio error on the internet upload

    On a video I made its an audio error only on the internet upload. On the youtube-video the audio volume suddenly turns down at 0:19. The same place where I incerted audio from another video because of too much background noise on the clips I muted. I

  • HT1918 How do I get rid of a 7 cent balance?

    I need to get rid of my balance before Apple will let me change my region from the Canada to the US. But I can't figure it out... and therefore I can't buy any apps. Please help!

  • HT5509 Remove dark area in Guided access.

    Is it possible to switch off the darker area that emerges in Guided access?That is, the screen looks normal but still has the touch limitations.