XCode Version 6.3.2 (6D2105)
The variable I'm attempting to display is of type boost::posix_time::ptime
but my question applies to any C/C++ type. The documentation for boost::posix_time::ptime specifies that the date part of the time (year, month, day) is retrieved by the date() method, and the fractional part of the time (hours, minutes, seconds) is returned by the time_of_day() method. So right-clicking on the variable in the list while the debugger is active allows me to set the summary format, and to just display the year part of the date should be something like {$VAR.date().year()}
. Ideally I would like to print 2015/6/11 3:20:29
in the summary next to the variable in the debugger view, but for now I'm just trying to display the year part.
However, 'Summary Unavailable' is displayed, and the output window prints:
error: call to a function 'boost::date_time::date<boost::gregorian::date, boost::gregorian::gregorian_calendar, boost::gregorian::date_duration>::year() const' ('_ZNK5boost9date_time4dateINS_9gregorian4dateENS2_18gregorian_calendarENS2_13date_durationEE4yearEv') that is not present in the target
The documentation (PDF format) states that summary format expressions can contain function and method calls, but the example given is for Objective C, not C++. This is in the main section Writing Data Formatters
and sub-section Expressions, including function or method calls