0

I have a textfile.txt with content like the following

*decltype with two or more arguments
decltype does not take two arguments. Simply it can have an expression as its argument, and the comma operator is one way of creating expressions.
Example:

// begin c++ code
#include <iostream>
#include <string>
#include <type_traits>   // for std::false_type etc
#include <utility>       // for boolalpha modifier
// Non-templated helper struct:
struct _test_has_tostring {
template<class T>
static auto test(T* p) -> decltype(p->ToString()
,std::true_type());
template<class>
static auto test(...) -> std::false_type;
};
// end c++ mode

The end of the text file*

How can I reformat (pretty print) the c++ block only ?

1
  • Use org-mode?
    – Drew
    Aug 5 at 15:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.