boostorg / boostorg/python

vector_indexing_suite does not work with structs

オープン
#123 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
537
フォーク
223
平均マージ
11時間 22分
マージ済み PR(30日)
2

説明

If you define a simple struct

```
struct Foo {
string a;
string b;
};

```
and then try to expose this via

class_>("FooList")
.def(vector_indexing_suite>() );

This causes an error,

> /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/c++/bits/predefined_ops.h:194:17: error: no match for ‘operator==’ (operand types are ‘Foo’ and ‘const Foo’)

Defining an explicit `operator==` fixes the problem --- but I'm wrapping code I can't change.

Full log attached.
[log.txt](https://github.com/boostorg/python/files/887739/log.txt)

Using Windows/Cygwin, gcc 5.4.0, python 2.7 and Boost 1.60.0, all installed via Cygwin rather than windows.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。