[odb-users] ODB compiler support for variable templates?

Andrew Cunningham odb at a-cunningham.com
Mon Aug 1 12:47:32 EDT 2016


Just put an #ifndef ODB_COMPILER around code the compiler can't understand.
The compiler is only interested in #pragma db statements.


On Fri, Jul 29, 2016 at 6:01 PM, Hales, Steve <Steve.Hales at garmin.com>
wrote:

> The ODB 2.4.0 compiler on Mac OS fails to compile the code below:
>
> // Begin code
> #include <string>
>
>
> template <typename CharT>
>
> static const auto theGuidRegexStr = std::basic_string<CharT>{};
>
>
> template <>
>
> static const auto theGuidRegexStr<char> = std::basic_string<char>
>
> {
>
>
> "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
>
> };
>
>
> template <>
>
> static const auto theGuidRegexStr<wchar_t> = std::basic_string<wchar_t>
>
> {
>
>
> L"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
>
> };
>
> // End code
>
> Does the 2.4.0 compiler support C++ 14 variable templates?
>
> Thanks,
> Steve
>
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole
> use of the intended recipient(s) and contain information that may be Garmin
> confidential and/or Garmin legally privileged. If you have received this
> email in error, please notify the sender by reply email and delete the
> message. Any disclosure, copying, distribution or use of this communication
> (including attachments) by someone other than the intended recipient is
> prohibited. Thank you.
>


More information about the odb-users mailing list