Boost logo

Boost :

Subject: [boost] [outcome] some problems compiling
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-05-23 21:46:57


So, I am trying to run my first test program with Boost.Outcome. The
library fails to compile with GCC 6.3.0 on MinGW on Windows 7. I have filed
the issue: https://github.com/ned14/boost.outcome/issues/36

But also, I can see in file <boost/outcome/outcome_v1.0.hpp>, lines 1267 to
1279

```
#ifdef __cplusplus
namespace
{
#endif

  typedef struct _IMAGEHLP_LINE64
  {
    unsigned long SizeOfStruct;
    void *Key;
    unsigned long LineNumber;
    wchar_t *FileName;
    unsigned long long int Address;
  } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
```

1. Why do you check for __cplusplus? Is it a copy-and-paste of some Windows
headers?
2. This class and subsequent functions are defined in anonymous namespace.
This means they are redefined and recompiled in each translation unit, and
remain a per TU definition. Is that intent?

Regards,
&rzej;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk