pod

What are POD types in C++?

I've been following SO for a bit now, and I've come across this term POD-type a few times... what does it mean? ...

What's the best way to document Perl code?

Any suggestion how I can document my Perl code? What do you use and what tools are available to help me? Which module do you use to convert pod to html? ...

Using SFINAE to detect POD-ness of a type in C++

The original title here was Workaround for SFINAE bug in VS2005 C++ This is tentative use of SFINAE to make the equivalent for the is_pod template class that exists in TR1 (In VS2005 there's no TR1 yet). It should have its value member true when the template parameter is a POD type (including primitive types and structs made of them) an...

How do I stop pod2html from treating "=head2 open() foo" as a function definition?

I have some POD that looks like =head2 C<close() on unopened filehandle %s> =over =item C<Yer tryna close() %s what ain't been opened yet> =back The pod2html command turns it into <h2><a name="close____on_unopened_filehandle__s"><a href="#item_close"><code>close () on unopened filehandle %s</code></a></a></h2> <dl> <dt><strong><a ...

POD class initialized with placement new default initialized?

If I initialize a POD class with placement new, can I assume that the memory will be default initialized (to zeros)? This resource clearly states that if you call the zero argument default constructor explicitly that the fields will be default initialized, but it is not clear if this would hold true using the default implementation of pl...

How to create POD and use pod2usage in perl ?

Hi, I want to create a POD for my own custom command and display the syntax for that using pod2usage() function.. Can anyone give me a simple example for it? Regards, Anandan ...

How can I have link text with a URL in Pod's L<>?

The L<name> formatting code allows you to set the display text for the link if you're linking to other POD, as in L<Display Text|link_dest>, but this isn't allowed for L<scheme:...> links, such as L<http://perldoc.perl.org/strict.html&gt; How do I specify a display text for such links? Alternatively, how do I manually write such a li...

Perl documentation (POD) browsers?

I'm looking for is a good on-screen POD reading experience. For years, I've used perldoc or man running in an xterm to read Perl documentation on screen, and a small custom program built around Pod::LaTeX to print it. The printed version is good: the script does a nice job. However, on-screen reading is painful: You can search, but go...

How do I get Perl POD in string and print it in page?

I have a POD document. Now, I want to convert that POD to a parsed section like usage/description and get it in a string. Why not pod2usage? This doesn't help me to get the output in string but in STDOUT/file. I am stressing on the point "getting it in string", because I want to display the POD in "pages" if the length exceeds screen ...

Are there any conventions for writing POD comments for Perl?

I was able to find a page from Safari Books Online that provides a template, but having never written POD comments, I'm not sure how good it is or if it is missing anything that might be considered convention to include. What are the conventions to follow when writing POD comments for Perl scripts? Is there anything like Sun's Javadoc C...

( POD )freeing memory : is delete[] equal to delete ?

IP_ADAPTER_INFO *ptr=new IP_ADAPTER_INFO[100]; if i free using delete ptr; will it lead to memory leak, if not then why ? This is disassembly code generated by VS2005 **delete ptr;** 0041351D mov eax,dword ptr [ptr] 00413520 mov dword ptr [ebp-0ECh],eax 00413526 mov ecx,dword ptr [ebp-0ECh] 0041352C ...

How to expose STL list over DLL boundary?

I have a DLL which needs to access data stored in STL containers in the host application. Because C++ has no standard ABI, and I want to support different compilers, the interface between the application and DLL basically has to remain plain-old-data. For vectors this is relatively straightforward. You can simply return the memory blo...

union members may not have constructors, but `std::pair` okay?

union members may not have destructors or constructors. So I can't template the following class Foo on my own MyClass if MyClass has a constructor: template<class T> struct Foo { T val; Foo(T val_) : val(val_) {} size_t hash() const { union {T f; size_t s;} u = { val }; return u.s; } }; struct MyClass { bool a; doubl...

Is it possible to share a C struct in shared memory between apps compiled with different compilers?

I realize that in general the C and C++ standards gives compiler writers a lot of latitude. But in particular it guarantees that POD types like C struct members have to be laid out in memory the same order that they're listed in the structs definition, and most compilers provide extensions letting you fix the alignment of members. So if ...

Ok to provide constructor + trivial operators for behaviorless aggregates?

This is a follow-up question to 2043381. Consider the following: struct DataBundle { std::string name; int age; DataBundle() : age(0) {} DataBundle(const std::string& name, int age) : name(name), age(age) {} void swap(DataBundle& rhs) {name.swap(rhs.name); std::swap(age, rhs.age);} DataBundle& operator=...

Is there a WYSIWYG Perl Pod editor?

Is there an easy to use "what-you-see-is-what-you-get" editor for Pod available? I'm not that used to the Pod syntax yet so having the option of writing the Pod and immediatly see what the output would look like will help a lot. Ideally this editor would have some kind of "code-completion" to help with the correct syntax. Is there an ...

PODs, non-PODs, rvalue and lvalues

Could anyone explain the details in terms of rvalues, lvalues, PODs, and non-PODs the reason why the first expression marked below is not ok while the second expression marked below is ok? In my understanding both int() and A() should be rvalues, no? struct A {}; int main() { int i; A a; int() = i; //Not OK (error). A() = a;...

Why is creating a ring buffer shared by different processes so hard (in C++), what I am doing wrong?

I am being especially dense about this but it seems I'm missing an important, basic point or something, since what I want to do should be common: I need to create a fixed-size ring buffer object from a manager process (Process M). This object has write() and read() methods to write/read from the buffer. The read/write methods will be ca...

How can I produce an HTML summary of Perl modules or scripts in a directory?

Is there a tool available that can produce an HTML summary list of perl modules or scripts in a directory tree? Given =head1 NAME wibble.pl - does wibble actions I would like to see something like <a href="docsforwibble">wibble.pl</a> - does wibble actions <a href="docsforwobble">wobble.pl</a> - does wobble actions ...

POD multilanguage documentation

Is there any way to write multilanguage documentation using POD? If no, what should I write it in (I already have POD documentation in English, so I will want to convert it and then translate)? ...